This commit is contained in:
Koen J 2025-07-29 11:15:49 +02:00
commit 2fc944ddd9
2 changed files with 8 additions and 9 deletions

View file

@ -251,12 +251,13 @@ abstract class ContentFeedView<TFragment> : FeedView<TFragment, IPlatformContent
} }
//TODO: Is this still necessary? //TODO: Is this still necessary?
fragment.lifecycleScope.launch(Dispatchers.Main) { if(viewHolder.childViewHolder is ContentPreviewViewHolder) {
try { fragment.lifecycleScope.launch(Dispatchers.Main) {
if(viewHolder.childViewHolder is ContentPreviewViewHolder) try {
(recyclerData.adapter as PreviewContentListAdapter?)?.preview(viewHolder.childViewHolder) (recyclerData.adapter as PreviewContentListAdapter?)?.preview(viewHolder.childViewHolder)
} catch (e: Throwable) { } catch (e: Throwable) {
Logger.e(TAG, "playPreview failed", e) Logger.e(TAG, "playPreview failed", e)
}
} }
} }
} }

View file

@ -2563,12 +2563,10 @@ class VideoDetailView : ConstraintLayout {
if (d != null && d.connectionState == CastConnectionState.CONNECTED) if (d != null && d.connectionState == CastConnectionState.CONNECTED)
castIfAvailable(context.contentResolver, video, _lastVideoSource, _lastAudioSource, toSet, (d.expectedCurrentTime * 1000.0).toLong(), d.speed); castIfAvailable(context.contentResolver, video, _lastVideoSource, _lastAudioSource, toSet, (d.expectedCurrentTime * 1000.0).toLong(), d.speed);
else { else {
withContext(Dispatchers.Main) { _player.swapSubtitles(toSet);
_player.swapSubtitles(toSet);
}
} }
} catch (e: Throwable) { } catch (e: Throwable) {
Logger.e(TAG, "handleSelectAudioTrack failed", e) Logger.e(TAG, "handleSelectSubtitleTrack failed", e)
} }
} }
_lastSubtitleSource = toSet; _lastSubtitleSource = toSet;