public void OnChildRemoved(DataSnapshot snapshot) { switch (snapshot.Key) { case "name": parent.DeleteSelf(true); break; } }
public void OnChildRemoved(DataSnapshot snapshot) { int deleted = parent.workspaces.FindIndex(v => v.Id == snapshot.Key); parent.mainLayout.RemoveViewAt(deleted); WorkspaceModel model = parent.workspaces[deleted]; parent.workspaces.RemoveAt(deleted); model.DeleteSelf(false); }