From 3ab06bf383d30ac80f1883b3a8b3a6a2ff3d8efa Mon Sep 17 00:00:00 2001 From: BO41 Date: Tue, 28 Aug 2018 19:48:24 +0200 Subject: [PATCH] class structure BUILD SUCCESSFUL in 17s 39 actionable tasks: 6 executed, 33 up-to-date --- .../list/channel/ChannelFragment.java | 4 +-- .../fragments/list/search/SearchFragment.java | 3 +- .../subscription/SubscriptionFragment.java | 2 +- .../newpipe/player/PopupVideoPlayer.java | 3 +- .../helper/PlaybackParameterDialog.java | 28 ++++++------------- .../schabi/newpipe/report/ErrorActivity.java | 13 +++------ .../settings/ContentSettingsFragment.java | 3 +- .../settings/SelectChannelFragment.java | 6 ++-- 8 files changed, 20 insertions(+), 42 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java index 9a52b8d12..562ee7f0d 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java @@ -90,8 +90,6 @@ public class ChannelFragment extends BaseListInfoFragment { private MenuItem menuRssButton; - private boolean mIsVisibleToUser = false; - public static ChannelFragment getInstance(int serviceId, String url, String name) { ChannelFragment instance = new ChannelFragment(); instance.setInitialData(serviceId, url, name); @@ -105,7 +103,7 @@ public class ChannelFragment extends BaseListInfoFragment { @Override public void setUserVisibleHint(boolean isVisibleToUser) { super.setUserVisibleHint(isVisibleToUser); - mIsVisibleToUser = isVisibleToUser; + boolean mIsVisibleToUser = isVisibleToUser; if(activity != null && useAsFrontPage && isVisibleToUser) { diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java index a699e28bc..b7831d4ab 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java @@ -122,7 +122,6 @@ public class SearchFragment private String nextPageUrl; private String contentCountry; private boolean isSuggestionsEnabled = true; - private boolean isSearchHistoryEnabled = true; private PublishSubject suggestionPublisher = PublishSubject.create(); private Disposable searchDisposable; @@ -173,7 +172,7 @@ public class SearchFragment suggestionListAdapter = new SuggestionListAdapter(activity); SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity); - isSearchHistoryEnabled = preferences.getBoolean(getString(R.string.enable_search_history_key), true); + boolean isSearchHistoryEnabled = preferences.getBoolean(getString(R.string.enable_search_history_key), true); suggestionListAdapter.setShowSuggestionHistory(isSearchHistoryEnabled); historyRecordManager = new HistoryRecordManager(context); diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java index d8a26f0eb..69852b809 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java @@ -81,7 +81,6 @@ public class SubscriptionFragment extends BaseStateFragment