-Renamed "watch history" fragment under bookmark to "last played".

-Renamed "watched history" fragment under history to "watch history".
This commit is contained in:
John Zhen Mo 2018-02-07 14:37:05 -08:00
parent 576c87fec3
commit d0308e8b02
7 changed files with 30 additions and 33 deletions

View file

@ -39,8 +39,8 @@ import io.reactivex.disposables.CompositeDisposable;
public final class BookmarkFragment
extends BaseLocalListFragment<List<PlaylistLocalItem>, Void> {
private View watchHistoryButton;
private View mostWatchedButton;
private View lastPlayedButton;
private View mostPlayedButton;
@State
protected Parcelable itemsListState;
@ -96,8 +96,8 @@ public final class BookmarkFragment
protected View getListHeader() {
final View headerRootLayout = activity.getLayoutInflater()
.inflate(R.layout.bookmark_header, itemsList, false);
watchHistoryButton = headerRootLayout.findViewById(R.id.watchHistory);
mostWatchedButton = headerRootLayout.findViewById(R.id.mostWatched);
lastPlayedButton = headerRootLayout.findViewById(R.id.lastPlayed);
mostPlayedButton = headerRootLayout.findViewById(R.id.mostPlayed);
return headerRootLayout;
}
@ -135,13 +135,13 @@ public final class BookmarkFragment
}
});
watchHistoryButton.setOnClickListener(view -> {
lastPlayedButton.setOnClickListener(view -> {
if (getParentFragment() != null) {
NavigationHelper.openWatchHistoryFragment(getParentFragment().getFragmentManager());
NavigationHelper.openLastPlayedFragment(getParentFragment().getFragmentManager());
}
});
mostWatchedButton.setOnClickListener(view -> {
mostPlayedButton.setOnClickListener(view -> {
if (getParentFragment() != null) {
NavigationHelper.openMostPlayedFragment(getParentFragment().getFragmentManager());
}
@ -178,8 +178,8 @@ public final class BookmarkFragment
@Override
public void onDestroyView() {
super.onDestroyView();
if (mostWatchedButton != null) mostWatchedButton.setOnClickListener(null);
if (watchHistoryButton != null) watchHistoryButton.setOnClickListener(null);
if (mostPlayedButton != null) mostPlayedButton.setOnClickListener(null);
if (lastPlayedButton != null) lastPlayedButton.setOnClickListener(null);
if (disposables != null) disposables.clear();
if (databaseSubscription != null) databaseSubscription.cancel();

View file

@ -6,10 +6,10 @@ import org.schabi.newpipe.database.stream.StreamStatisticsEntry;
import java.util.Collections;
import java.util.List;
public final class WatchHistoryFragment extends StatisticsPlaylistFragment {
public final class LastPlayedFragment extends StatisticsPlaylistFragment {
@Override
protected String getName() {
return getString(R.string.title_watch_history);
return getString(R.string.title_last_played);
}
@Override