From 9f592576ea4d58c6cc658b57215f658d8ea8a16c Mon Sep 17 00:00:00 2001 From: Quickdesh Date: Fri, 27 Oct 2023 16:59:46 -0400 Subject: [PATCH] fix(player): Audio tracks are shown properly in offline videos --- .../ui/player/settings/sheets/TracksListingSheet.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/player/settings/sheets/TracksListingSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/player/settings/sheets/TracksListingSheet.kt index f8bdc289e4..6310231241 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/player/settings/sheets/TracksListingSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/player/settings/sheets/TracksListingSheet.kt @@ -81,10 +81,10 @@ fun TracksCatalogSheet( onTrackSelected = onAudioSelected, ) - when { - isEpisodeOnline == true && page == 0 -> QualityTracksPage() - page == 0 || page == 1 -> SubtitleTracksPage() - page == 2 -> AudioTracksPage() + when (page) { + 0 -> if (isEpisodeOnline == true) QualityTracksPage() else SubtitleTracksPage() + 1 -> if (isEpisodeOnline == true) SubtitleTracksPage() else AudioTracksPage() + 2 -> if (isEpisodeOnline == true) AudioTracksPage() } } }