use of com.odysee.app.MainActivity in project odysee-android by OdyseeTeam.
the class SearchFragment method onPause.
public void onPause() {
Context context = getContext();
if (context != null) {
MainActivity activity = (MainActivity) context;
activity.removeDownloadActionListener(this);
activity.updateMiniPlayerMargins(true);
PreferenceManager.getDefaultSharedPreferences(context).unregisterOnSharedPreferenceChangeListener(this);
}
super.onPause();
}
use of com.odysee.app.MainActivity in project odysee-android by OdyseeTeam.
the class SearchFragment method onStop.
@Override
public void onStop() {
MainActivity activity = (MainActivity) getContext();
if (activity != null) {
activity.resetCurrentDisplayFragment();
activity.showBottomNavigation();
activity.cancelScheduledSearchFuture();
}
super.onStop();
}
use of com.odysee.app.MainActivity in project odysee-android by OdyseeTeam.
the class SearchFragment method onResume.
public void onResume() {
super.onResume();
Context context = getContext();
Helper.setWunderbarValue(currentQuery, context);
if (context != null) {
PreferenceManager.getDefaultSharedPreferences(context).registerOnSharedPreferenceChangeListener(this);
if (context instanceof MainActivity) {
MainActivity activity = (MainActivity) context;
LbryAnalytics.setCurrentScreen(activity, "Search", "Search");
activity.addDownloadActionListener(this);
activity.updateCurrentDisplayFragment(this);
activity.updateMiniPlayerMargins(false);
}
}
if (!Helper.isNullOrEmpty(currentQuery)) {
logSearch(currentQuery);
search(currentQuery, currentFrom);
} else {
lassoSpacemanView.setVisibility(View.VISIBLE);
explainerView.setText(getString(R.string.search_type_to_discover));
explainerView.setVisibility(View.VISIBLE);
}
applyFilterForBlockedChannels(Lbryio.blockedChannels);
}
use of com.odysee.app.MainActivity in project odysee-android by OdyseeTeam.
the class AllContentFragment method onResume.
public void onResume() {
super.onResume();
Helper.setWunderbarValue(null, getContext());
checkParams(false);
Context context = getContext();
if (context instanceof MainActivity) {
MainActivity activity = (MainActivity) context;
if (singleTagView) {
LbryAnalytics.setCurrentScreen(activity, "Tag", "Tag");
} else {
LbryAnalytics.setCurrentScreen(activity, "All Content", "AllContent");
}
activity.addDownloadActionListener(this);
if (activity.isInitialCategoriesLoaded()) {
buildAndDisplayContentCategories();
}
PreferenceManager.getDefaultSharedPreferences(context).registerOnSharedPreferenceChangeListener(this);
updateContentFromLinkText();
updateContentScopeLinkText();
updateSortByLinkText();
}
applyFilterForBlockedChannels(Lbryio.blockedChannels);
}
use of com.odysee.app.MainActivity in project odysee-android by OdyseeTeam.
the class AllContentFragment method onPause.
public void onPause() {
Context context = getContext();
if (context != null) {
((MainActivity) context).removeDownloadActionListener(this);
}
PreferenceManager.getDefaultSharedPreferences(context).unregisterOnSharedPreferenceChangeListener(this);
contentCategoriesDisplayed = false;
super.onPause();
}
Aggregations