private String removeScene(String sceneId) { mDbManager.removeScene(sceneId); mDbManager.removeTaskBy(sceneId); if (StorageFactory.getUserStorage(context).getCurrentScene().sceneID.equals(sceneId)) { StorageFactory.getUserStorage(context).setCurrentScene(null); } return IntentConsts.Extra.EPISODES; }
private String removeEpisode(String episodeId) { List<String> scenes = mDbManager.removeEpisode(episodeId); if (StorageFactory.getUserStorage(context).getCurrentEpisode().episodeID.equals(episodeId)) { StorageFactory.getUserStorage(context).setCurrentEpisode(null); } if (ListsUtils.isEmpty(scenes)) return null; mDbManager.removeTasksBy(scenes); mDbManager.removeEpisodeIdFromCourse(episodeId); return IntentConsts.Extra.EPISODES; // ADD MANAGER }