From e58feadba9e38b54f871568f2fa7f3e3dd3eaca7 Mon Sep 17 00:00:00 2001 From: Stypox Date: Fri, 26 Mar 2021 11:35:54 +0100 Subject: [PATCH] Remove IN HISTORY label on stream info items --- .../newpipe/database/feed/dao/FeedDAO.kt | 8 +++--- .../database/stream/StreamWithState.kt | 5 +--- .../newpipe/local/feed/item/StreamItem.kt | 4 --- .../main/res/layout/list_stream_grid_item.xml | 26 ------------------- app/src/main/res/layout/list_stream_item.xml | 26 ------------------- .../main/res/layout/list_stream_mini_item.xml | 26 ------------------- .../layout/list_stream_playlist_grid_item.xml | 26 ------------------- .../res/layout/list_stream_playlist_item.xml | 26 ------------------- 8 files changed, 5 insertions(+), 142 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/database/feed/dao/FeedDAO.kt b/app/src/main/java/org/schabi/newpipe/database/feed/dao/FeedDAO.kt index 4b3bcdd7e..769c72832 100644 --- a/app/src/main/java/org/schabi/newpipe/database/feed/dao/FeedDAO.kt +++ b/app/src/main/java/org/schabi/newpipe/database/feed/dao/FeedDAO.kt @@ -21,7 +21,7 @@ abstract class FeedDAO { @Query( """ - SELECT s.*, sst.progress_time, (sh.stream_id IS NOT NULL) AS is_stream_in_history + SELECT s.*, sst.progress_time FROM streams s LEFT JOIN stream_state sst @@ -41,7 +41,7 @@ abstract class FeedDAO { @Query( """ - SELECT s.*, sst.progress_time, (sh.stream_id IS NOT NULL) AS is_stream_in_history + SELECT s.*, sst.progress_time FROM streams s LEFT JOIN stream_state sst @@ -66,7 +66,7 @@ abstract class FeedDAO { @Query( """ - SELECT s.*, sst.progress_time, (sh.stream_id IS NOT NULL) AS is_stream_in_history + SELECT s.*, sst.progress_time FROM streams s LEFT JOIN stream_state sst @@ -95,7 +95,7 @@ abstract class FeedDAO { @Query( """ - SELECT s.*, sst.progress_time, (sh.stream_id IS NOT NULL) AS is_stream_in_history + SELECT s.*, sst.progress_time FROM streams s LEFT JOIN stream_state sst diff --git a/app/src/main/java/org/schabi/newpipe/database/stream/StreamWithState.kt b/app/src/main/java/org/schabi/newpipe/database/stream/StreamWithState.kt index 40c786246..759dbae29 100644 --- a/app/src/main/java/org/schabi/newpipe/database/stream/StreamWithState.kt +++ b/app/src/main/java/org/schabi/newpipe/database/stream/StreamWithState.kt @@ -10,8 +10,5 @@ data class StreamWithState( val stream: StreamEntity, @ColumnInfo(name = StreamStateEntity.STREAM_PROGRESS_TIME) - val stateProgressTime: Long?, - - @ColumnInfo(name = "is_stream_in_history") - val isInHistory: Boolean = false + val stateProgressTime: Long? ) diff --git a/app/src/main/java/org/schabi/newpipe/local/feed/item/StreamItem.kt b/app/src/main/java/org/schabi/newpipe/local/feed/item/StreamItem.kt index 88c5d809d..dbd675161 100644 --- a/app/src/main/java/org/schabi/newpipe/local/feed/item/StreamItem.kt +++ b/app/src/main/java/org/schabi/newpipe/local/feed/item/StreamItem.kt @@ -30,7 +30,6 @@ data class StreamItem( private val stream: StreamEntity = streamWithState.stream private val stateProgressTime: Long? = streamWithState.stateProgressTime - private val isInHistory: Boolean = streamWithState.isInHistory override fun getId(): Long = stream.uid @@ -94,9 +93,6 @@ data class StreamItem( viewBinding.itemProgressView.visibility = View.GONE } - viewBinding.itemInHistoryIndicatorView.visibility = - if (isInHistory && !isLiveStream) View.VISIBLE else View.GONE - ImageLoader.getInstance().displayImage( stream.thumbnailUrl, viewBinding.itemThumbnailView, ImageDisplayConstants.DISPLAY_THUMBNAIL_OPTIONS diff --git a/app/src/main/res/layout/list_stream_grid_item.xml b/app/src/main/res/layout/list_stream_grid_item.xml index 1a65b41a1..4e3d6edfb 100644 --- a/app/src/main/res/layout/list_stream_grid_item.xml +++ b/app/src/main/res/layout/list_stream_grid_item.xml @@ -20,32 +20,6 @@ android:src="@drawable/dummy_thumbnail" tools:ignore="RtlHardcoded" /> - - - - - - - - - -