mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-25 04:22:30 +01:00
Remove IN HISTORY label on stream info items
This commit is contained in:
parent
360f5ac6f7
commit
e58feadba9
@ -21,7 +21,7 @@ abstract class FeedDAO {
|
|||||||
|
|
||||||
@Query(
|
@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
|
FROM streams s
|
||||||
|
|
||||||
LEFT JOIN stream_state sst
|
LEFT JOIN stream_state sst
|
||||||
@ -41,7 +41,7 @@ abstract class FeedDAO {
|
|||||||
|
|
||||||
@Query(
|
@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
|
FROM streams s
|
||||||
|
|
||||||
LEFT JOIN stream_state sst
|
LEFT JOIN stream_state sst
|
||||||
@ -66,7 +66,7 @@ abstract class FeedDAO {
|
|||||||
|
|
||||||
@Query(
|
@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
|
FROM streams s
|
||||||
|
|
||||||
LEFT JOIN stream_state sst
|
LEFT JOIN stream_state sst
|
||||||
@ -95,7 +95,7 @@ abstract class FeedDAO {
|
|||||||
|
|
||||||
@Query(
|
@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
|
FROM streams s
|
||||||
|
|
||||||
LEFT JOIN stream_state sst
|
LEFT JOIN stream_state sst
|
||||||
|
@ -10,8 +10,5 @@ data class StreamWithState(
|
|||||||
val stream: StreamEntity,
|
val stream: StreamEntity,
|
||||||
|
|
||||||
@ColumnInfo(name = StreamStateEntity.STREAM_PROGRESS_TIME)
|
@ColumnInfo(name = StreamStateEntity.STREAM_PROGRESS_TIME)
|
||||||
val stateProgressTime: Long?,
|
val stateProgressTime: Long?
|
||||||
|
|
||||||
@ColumnInfo(name = "is_stream_in_history")
|
|
||||||
val isInHistory: Boolean = false
|
|
||||||
)
|
)
|
||||||
|
@ -30,7 +30,6 @@ data class StreamItem(
|
|||||||
|
|
||||||
private val stream: StreamEntity = streamWithState.stream
|
private val stream: StreamEntity = streamWithState.stream
|
||||||
private val stateProgressTime: Long? = streamWithState.stateProgressTime
|
private val stateProgressTime: Long? = streamWithState.stateProgressTime
|
||||||
private val isInHistory: Boolean = streamWithState.isInHistory
|
|
||||||
|
|
||||||
override fun getId(): Long = stream.uid
|
override fun getId(): Long = stream.uid
|
||||||
|
|
||||||
@ -94,9 +93,6 @@ data class StreamItem(
|
|||||||
viewBinding.itemProgressView.visibility = View.GONE
|
viewBinding.itemProgressView.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
viewBinding.itemInHistoryIndicatorView.visibility =
|
|
||||||
if (isInHistory && !isLiveStream) View.VISIBLE else View.GONE
|
|
||||||
|
|
||||||
ImageLoader.getInstance().displayImage(
|
ImageLoader.getInstance().displayImage(
|
||||||
stream.thumbnailUrl, viewBinding.itemThumbnailView,
|
stream.thumbnailUrl, viewBinding.itemThumbnailView,
|
||||||
ImageDisplayConstants.DISPLAY_THUMBNAIL_OPTIONS
|
ImageDisplayConstants.DISPLAY_THUMBNAIL_OPTIONS
|
||||||
|
@ -20,32 +20,6 @@
|
|||||||
android:src="@drawable/dummy_thumbnail"
|
android:src="@drawable/dummy_thumbnail"
|
||||||
tools:ignore="RtlHardcoded" />
|
tools:ignore="RtlHardcoded" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/itemInHistoryIndicatorView"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignStart="@id/itemThumbnailView"
|
|
||||||
android:layout_alignTop="@id/itemThumbnailView"
|
|
||||||
android:layout_alignEnd="@id/itemThumbnailView"
|
|
||||||
android:layout_alignBottom="@id/itemThumbnailView"
|
|
||||||
android:layout_gravity="top|left"
|
|
||||||
android:background="@drawable/item_in_history_indicator_background"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:paddingLeft="@dimen/item_in_history_indicator_horizontal_margin"
|
|
||||||
android:paddingTop="@dimen/item_in_history_indicator_vertical_margin"
|
|
||||||
android:paddingRight="@dimen/item_in_history_indicator_horizontal_margin"
|
|
||||||
android:paddingBottom="@dimen/item_in_history_indicator_vertical_margin"
|
|
||||||
android:text="@string/item_in_history"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
||||||
android:textColor="@color/item_in_history_indicator_text_color"
|
|
||||||
android:textSize="@dimen/item_in_history_indicator_text_size"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:ignore="RtlHardcoded"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/itemDurationView"
|
android:id="@+id/itemDurationView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -25,32 +25,6 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
tools:ignore="RtlHardcoded" />
|
tools:ignore="RtlHardcoded" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/itemInHistoryIndicatorView"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignStart="@id/itemThumbnailView"
|
|
||||||
android:layout_alignTop="@id/itemThumbnailView"
|
|
||||||
android:layout_alignEnd="@id/itemThumbnailView"
|
|
||||||
android:layout_alignBottom="@id/itemThumbnailView"
|
|
||||||
android:layout_gravity="top|left"
|
|
||||||
android:background="@drawable/item_in_history_indicator_background"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:paddingLeft="@dimen/item_in_history_indicator_horizontal_margin"
|
|
||||||
android:paddingTop="@dimen/item_in_history_indicator_vertical_margin"
|
|
||||||
android:paddingRight="@dimen/item_in_history_indicator_horizontal_margin"
|
|
||||||
android:paddingBottom="@dimen/item_in_history_indicator_vertical_margin"
|
|
||||||
android:text="@string/item_in_history"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
||||||
android:textColor="@color/item_in_history_indicator_text_color"
|
|
||||||
android:textSize="@dimen/item_in_history_indicator_text_size"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:ignore="RtlHardcoded"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/itemDurationView"
|
android:id="@+id/itemDurationView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -22,32 +22,6 @@
|
|||||||
android:src="@drawable/dummy_thumbnail"
|
android:src="@drawable/dummy_thumbnail"
|
||||||
tools:ignore="RtlHardcoded" />
|
tools:ignore="RtlHardcoded" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/itemInHistoryIndicatorView"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignStart="@id/itemThumbnailView"
|
|
||||||
android:layout_alignTop="@id/itemThumbnailView"
|
|
||||||
android:layout_alignEnd="@id/itemThumbnailView"
|
|
||||||
android:layout_alignBottom="@id/itemThumbnailView"
|
|
||||||
android:layout_gravity="top|left"
|
|
||||||
android:background="@drawable/item_in_history_indicator_background"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:paddingLeft="@dimen/item_in_history_indicator_horizontal_margin"
|
|
||||||
android:paddingTop="@dimen/item_in_history_indicator_vertical_margin"
|
|
||||||
android:paddingRight="@dimen/item_in_history_indicator_horizontal_margin"
|
|
||||||
android:paddingBottom="@dimen/item_in_history_indicator_vertical_margin"
|
|
||||||
android:text="@string/item_in_history"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
||||||
android:textColor="@color/item_in_history_indicator_text_color"
|
|
||||||
android:textSize="@dimen/item_in_history_indicator_text_size"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:ignore="RtlHardcoded"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/itemDurationView"
|
android:id="@+id/itemDurationView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -22,32 +22,6 @@
|
|||||||
android:src="@drawable/dummy_thumbnail"
|
android:src="@drawable/dummy_thumbnail"
|
||||||
tools:ignore="RtlHardcoded" />
|
tools:ignore="RtlHardcoded" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/itemInHistoryIndicatorView"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignStart="@id/itemThumbnailView"
|
|
||||||
android:layout_alignTop="@id/itemThumbnailView"
|
|
||||||
android:layout_alignEnd="@id/itemThumbnailView"
|
|
||||||
android:layout_alignBottom="@id/itemThumbnailView"
|
|
||||||
android:layout_gravity="top|left"
|
|
||||||
android:background="@drawable/item_in_history_indicator_background"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:paddingLeft="@dimen/item_in_history_indicator_horizontal_margin"
|
|
||||||
android:paddingTop="@dimen/item_in_history_indicator_vertical_margin"
|
|
||||||
android:paddingRight="@dimen/item_in_history_indicator_horizontal_margin"
|
|
||||||
android:paddingBottom="@dimen/item_in_history_indicator_vertical_margin"
|
|
||||||
android:text="@string/item_in_history"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
||||||
android:textColor="@color/item_in_history_indicator_text_color"
|
|
||||||
android:textSize="@dimen/item_in_history_indicator_text_size"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:ignore="RtlHardcoded"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/itemDurationView"
|
android:id="@+id/itemDurationView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -23,32 +23,6 @@
|
|||||||
android:src="@drawable/dummy_thumbnail"
|
android:src="@drawable/dummy_thumbnail"
|
||||||
tools:ignore="RtlHardcoded" />
|
tools:ignore="RtlHardcoded" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/itemInHistoryIndicatorView"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignStart="@id/itemThumbnailView"
|
|
||||||
android:layout_alignTop="@id/itemThumbnailView"
|
|
||||||
android:layout_alignEnd="@id/itemThumbnailView"
|
|
||||||
android:layout_alignBottom="@id/itemThumbnailView"
|
|
||||||
android:layout_gravity="top|left"
|
|
||||||
android:background="@drawable/item_in_history_indicator_background"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:paddingLeft="@dimen/item_in_history_indicator_horizontal_margin"
|
|
||||||
android:paddingTop="@dimen/item_in_history_indicator_vertical_margin"
|
|
||||||
android:paddingRight="@dimen/item_in_history_indicator_horizontal_margin"
|
|
||||||
android:paddingBottom="@dimen/item_in_history_indicator_vertical_margin"
|
|
||||||
android:text="@string/item_in_history"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
||||||
android:textColor="@color/item_in_history_indicator_text_color"
|
|
||||||
android:textSize="@dimen/item_in_history_indicator_text_size"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:ignore="RtlHardcoded"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/itemDurationView"
|
android:id="@+id/itemDurationView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
Loading…
Reference in New Issue
Block a user