Skip to content

Commit 25dd3ea

Browse files
committed
fix: Hopefully fix the last issues with skip intro button
closes #1985
1 parent cf99a5a commit 25dd3ea

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

app/src/main/java/eu/kanade/tachiyomi/ui/player/PlayerViewModel.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,7 @@ class PlayerViewModel @JvmOverloads constructor(
11941194

11951195
// Write to mpv table
11961196
MPVLib.setPropertyString("user-data/current-anime/anime-title", anime.title)
1197-
MPVLib.setPropertyInt("user-data/current-anime/intro-length", anime.skipIntroLength)
1197+
MPVLib.setPropertyInt("user-data/current-anime/intro-length", getAnimeSkipIntroLength())
11981198
MPVLib.setPropertyString(
11991199
"user-data/current-anime/category",
12001200
getAnimeCategories.await(anime.id).joinToString {
@@ -1817,10 +1817,10 @@ class PlayerViewModel @JvmOverloads constructor(
18171817
* Updates the skipIntroLength for the open anime.
18181818
*/
18191819
fun setAnimeSkipIntroLength(skipIntroLength: Long) {
1820-
// Skip unnecessary database operation
1821-
if (skipIntroLength == getAnimeSkipIntroLength().toLong()) return
18221820
val anime = currentAnime.value ?: return
18231821
if (!anime.favorite) return
1822+
// Skip unnecessary database operation
1823+
if (skipIntroLength == getAnimeSkipIntroLength().toLong()) return
18241824
viewModelScope.launchIO {
18251825
setAnimeViewerFlags.awaitSetSkipIntroLength(anime.id, skipIntroLength)
18261826
_currentAnime.update { _ -> getAnime.await(anime.id) }

0 commit comments

Comments
 (0)