mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
Merge pull request #5159 from FineFindus/fix/creator-highlight
fix: properly apply creator highlight
This commit is contained in:
commit
c86477c32b
@ -77,7 +77,10 @@ object DatabaseHelper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun filterByWatchStatus(streams: List<WatchHistoryItem>, unfinished: Boolean = true): List<WatchHistoryItem> {
|
suspend fun filterByWatchStatus(
|
||||||
|
streams: List<WatchHistoryItem>,
|
||||||
|
unfinished: Boolean = true
|
||||||
|
): List<WatchHistoryItem> {
|
||||||
return streams.filter {
|
return streams.filter {
|
||||||
withContext(Dispatchers.IO) {
|
withContext(Dispatchers.IO) {
|
||||||
val historyItem = Database.watchPositionDao()
|
val historyItem = Database.watchPositionDao()
|
||||||
|
@ -73,9 +73,9 @@ class CommentsAdapter(
|
|||||||
val comment = comments[position]
|
val comment = comments[position]
|
||||||
holder.binding.apply {
|
holder.binding.apply {
|
||||||
commentAuthor.text = comment.author
|
commentAuthor.text = comment.author
|
||||||
if (comment.channelOwner) {
|
commentAuthor.setBackgroundResource(
|
||||||
commentAuthor.setBackgroundResource(R.drawable.comment_channel_owner_bg)
|
if (comment.channelOwner) R.drawable.comment_channel_owner_bg else 0
|
||||||
}
|
)
|
||||||
commentInfos.text = TextUtils.SEPARATOR + comment.commentedTime
|
commentInfos.text = TextUtils.SEPARATOR + comment.commentedTime
|
||||||
|
|
||||||
commentText.movementMethod = LinkMovementMethodCompat.getInstance()
|
commentText.movementMethod = LinkMovementMethodCompat.getInstance()
|
||||||
|
@ -37,7 +37,6 @@ import androidx.fragment.app.commit
|
|||||||
import androidx.lifecycle.Lifecycle
|
import androidx.lifecycle.Lifecycle
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.media3.common.C
|
import androidx.media3.common.C
|
||||||
import androidx.media3.common.C.WakeMode
|
|
||||||
import androidx.media3.common.MediaItem
|
import androidx.media3.common.MediaItem
|
||||||
import androidx.media3.common.MediaItem.SubtitleConfiguration
|
import androidx.media3.common.MediaItem.SubtitleConfiguration
|
||||||
import androidx.media3.common.MimeTypes
|
import androidx.media3.common.MimeTypes
|
||||||
|
@ -145,15 +145,16 @@ object PlayingQueue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun fetchMoreFromPlaylist(playlistId: String, nextPage: String?, isMainList: Boolean) = runCatchingIO {
|
private fun fetchMoreFromPlaylist(playlistId: String, nextPage: String?, isMainList: Boolean) =
|
||||||
var playlistNextPage = nextPage
|
runCatchingIO {
|
||||||
while (playlistNextPage != null) {
|
var playlistNextPage = nextPage
|
||||||
RetrofitInstance.authApi.getPlaylistNextPage(playlistId, playlistNextPage).run {
|
while (playlistNextPage != null) {
|
||||||
addToQueueAsync(relatedStreams, isMainList = isMainList)
|
RetrofitInstance.authApi.getPlaylistNextPage(playlistId, playlistNextPage).run {
|
||||||
playlistNextPage = this.nextpage
|
addToQueueAsync(relatedStreams, isMainList = isMainList)
|
||||||
|
playlistNextPage = this.nextpage
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fun insertPlaylist(playlistId: String, newCurrentStream: StreamItem?) = runCatchingIO {
|
fun insertPlaylist(playlistId: String, newCurrentStream: StreamItem?) = runCatchingIO {
|
||||||
val playlist = PlaylistsHelper.getPlaylist(playlistId)
|
val playlist = PlaylistsHelper.getPlaylist(playlistId)
|
||||||
|
Loading…
Reference in New Issue
Block a user