From 6191553f896fbdd5af10c8f5a76958bcd6c572a9 Mon Sep 17 00:00:00 2001 From: Johannes Joens <34899572+jopejoe1@users.noreply.github.com> Date: Thu, 6 May 2021 15:56:47 +1200 Subject: [PATCH] Luscious android 8 support fix (#6854) * Fix Support for Android 8> * Update LusciousGenerator.kt --- .../eu/kanade/tachiyomi/multisrc/luscious/Luscious.kt | 9 +++------ .../tachiyomi/multisrc/luscious/LusciousGenerator.kt | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/luscious/Luscious.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/luscious/Luscious.kt index 15900f1ba..f8c53d192 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/luscious/Luscious.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/luscious/Luscious.kt @@ -29,8 +29,7 @@ import okhttp3.Response import rx.Observable import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter +import java.util.Calendar abstract class Luscious( override val name: String, @@ -648,10 +647,8 @@ abstract class Luscious( private fun validYears(): List{ val years = mutableListOf() - val current = LocalDateTime.now() - val formatter = DateTimeFormatter.ofPattern("yyyy") - val formatted = current.format(formatter) - val currentYear = formatted.toInt() + val current = Calendar.getInstance() + val currentYear = current.get(Calendar.YEAR) var firstYear = 2013 while (currentYear != firstYear -1) { years.add(firstYear) diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/luscious/LusciousGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/luscious/LusciousGenerator.kt index 230335989..9eac93673 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/luscious/LusciousGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/luscious/LusciousGenerator.kt @@ -10,7 +10,7 @@ class LusciousGenerator : ThemeSourceGenerator { override val themeClass = "Luscious" - override val baseVersionCode: Int = 5 + override val baseVersionCode: Int = 6 override val sources = listOf( MultiLang("Luscious", "https://www.luscious.net", listOf("en","ja", "es", "it", "de", "fr", "zh", "ko", "other", "pt", "th", "all"), isNsfw = true, className = "LusciousFactory", overrideVersionCode = 2),