@Override public void onResume() { super.onResume(); getPreferences(); updateUnwatchedCounts(); onLoadRemainingCounter(); EventBus.getDefault().register(this); }
public void onEvent(EpisodeTools.EpisodeActionCompletedEvent event) { /** Updates the total remaining episodes counter, updates season counters. */ if (isAdded()) { onLoadRemainingCounter(); if (event.mType instanceof EpisodeTools.SeasonWatchedType) { // If we can narrow it down to just one season... EpisodeTools.SeasonWatchedType seasonWatchedType = (SeasonWatchedType) event.mType; Thread t = new UpdateUnwatchThread( String.valueOf(getShowId()), String.valueOf(seasonWatchedType.getSeasonTvdbId())); t.start(); } else { updateUnwatchedCounts(); } } }