mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-09-17 06:52:27 +00:00
Cleanup.
This commit is contained in:
parent
4df227147c
commit
2fc944ddd9
2 changed files with 8 additions and 9 deletions
|
@ -251,12 +251,13 @@ abstract class ContentFeedView<TFragment> : FeedView<TFragment, IPlatformContent
|
|||
}
|
||||
|
||||
//TODO: Is this still necessary?
|
||||
fragment.lifecycleScope.launch(Dispatchers.Main) {
|
||||
try {
|
||||
if(viewHolder.childViewHolder is ContentPreviewViewHolder)
|
||||
if(viewHolder.childViewHolder is ContentPreviewViewHolder) {
|
||||
fragment.lifecycleScope.launch(Dispatchers.Main) {
|
||||
try {
|
||||
(recyclerData.adapter as PreviewContentListAdapter?)?.preview(viewHolder.childViewHolder)
|
||||
} catch (e: Throwable) {
|
||||
Logger.e(TAG, "playPreview failed", e)
|
||||
} catch (e: Throwable) {
|
||||
Logger.e(TAG, "playPreview failed", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2563,12 +2563,10 @@ class VideoDetailView : ConstraintLayout {
|
|||
if (d != null && d.connectionState == CastConnectionState.CONNECTED)
|
||||
castIfAvailable(context.contentResolver, video, _lastVideoSource, _lastAudioSource, toSet, (d.expectedCurrentTime * 1000.0).toLong(), d.speed);
|
||||
else {
|
||||
withContext(Dispatchers.Main) {
|
||||
_player.swapSubtitles(toSet);
|
||||
}
|
||||
_player.swapSubtitles(toSet);
|
||||
}
|
||||
} catch (e: Throwable) {
|
||||
Logger.e(TAG, "handleSelectAudioTrack failed", e)
|
||||
Logger.e(TAG, "handleSelectSubtitleTrack failed", e)
|
||||
}
|
||||
}
|
||||
_lastSubtitleSource = toSet;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue