public void DeleteIglooLayout(long iglooId) { foreach (SavedIglooMetaData savedIgloo in savedIgloosMetaData.SavedIgloos) { if (savedIgloo.LayoutId == iglooId) { iglooToDelete = savedIgloo; } } if (iglooToDelete != null) { eventDispatcher.AddListener <IglooServiceEvents.IglooLayoutDeleted>(onIglooLayoutDeleted); stateController.ShowLoadingModalPopup(); if (iglooToDelete.LayoutId == initialActiveIglooId) { stateController.DataManager.UpdateIglooData(onIglooDataUpdated); } else { iglooService.DeleteIglooLayout(iglooId); } } else { Log.LogErrorFormatted(this, "Tried to delete igloo (ID: {0}), but this igloo was not found in the SavedIgloosMetaData!", iglooId); stateController.IglooSaveStatusNotification(IglooUIStateController.IglooSaveStatus.GeneralError, showAfterSceneLoad: false); } }
private void onUpdateIglooDataFromCloseButton(bool success, SceneLayoutData sceneLayoutData) { stateController.HideLoadingModalPopup(); if (success) { if (stateController.DataManager.LayoutManager.IsLayoutActive(sceneLayoutData.LayoutId)) { stateController.CloseManageIglooPopup(); } else { stateController.ReloadPlay(sceneLayoutData); } } else { stateController.IglooSaveStatusNotification(IglooUIStateController.IglooSaveStatus.GeneralError, showAfterSceneLoad: false); stateController.CloseManageIglooPopup(); } }