summaryrefslogtreecommitdiffstats
path: root/app/src/main/java/app/fedilab/android/peertube/drawer/PeertubeAdapter.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/app/fedilab/android/peertube/drawer/PeertubeAdapter.java')
-rw-r--r--app/src/main/java/app/fedilab/android/peertube/drawer/PeertubeAdapter.java37
1 files changed, 17 insertions, 20 deletions
diff --git a/app/src/main/java/app/fedilab/android/peertube/drawer/PeertubeAdapter.java b/app/src/main/java/app/fedilab/android/peertube/drawer/PeertubeAdapter.java
index fa39fe001..a9bbf9d20 100644
--- a/app/src/main/java/app/fedilab/android/peertube/drawer/PeertubeAdapter.java
+++ b/app/src/main/java/app/fedilab/android/peertube/drawer/PeertubeAdapter.java
@@ -91,6 +91,18 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
private ChannelData.Channel forChannel;
private AccountData.PeertubeAccount forAccount;
+ public PeertubeAdapter(List<VideoData.Video> videos, TimelineVM.TimelineType timelineType, boolean sepiaSearch, ChannelData.Channel forChannel, AccountData.PeertubeAccount forAccount) {
+ this.videos = videos;
+ this.timelineType = timelineType;
+ this.sepiaSearch = sepiaSearch || timelineType == SEPIA_SEARCH;
+ this.forChannel = forChannel;
+ this.forAccount = forAccount;
+ }
+
+ public PeertubeAdapter(List<VideoData.Video> videos) {
+ this.videos = videos;
+ }
+
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
@@ -107,19 +119,6 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
}
- public PeertubeAdapter(List<VideoData.Video> videos, TimelineVM.TimelineType timelineType, boolean sepiaSearch, ChannelData.Channel forChannel, AccountData.PeertubeAccount forAccount) {
- this.videos = videos;
- this.timelineType = timelineType;
- this.sepiaSearch = sepiaSearch || timelineType == SEPIA_SEARCH;
- this.forChannel = forChannel;
- this.forAccount = forAccount;
- }
-
-
- public PeertubeAdapter(List<VideoData.Video> videos) {
- this.videos = videos;
- }
-
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int position) {
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
@@ -509,13 +508,6 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
}
-
- enum typeOfTimeline {
- CLASSIC,
- LIST
- }
-
-
public void manageVIewPlaylists(VideoData.Video video, APIResponse apiResponse) {
if (apiResponse.getError() != null) {
return;
@@ -667,6 +659,11 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
}
+ enum typeOfTimeline {
+ CLASSIC,
+ LIST
+ }
+
public interface RelationShipListener {
Map<String, Boolean> getRelationShip();
}