Luscious android 8 support fix (#6854)

* Fix Support for Android 8>

* Update LusciousGenerator.kt
This commit is contained in:
Johannes Joens 2021-05-06 15:56:47 +12:00 committed by GitHub
parent 715bdcccc1
commit 6191553f89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 7 deletions

View File

@ -29,8 +29,7 @@ import okhttp3.Response
import rx.Observable import rx.Observable
import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get import uy.kohesive.injekt.api.get
import java.time.LocalDateTime import java.util.Calendar
import java.time.format.DateTimeFormatter
abstract class Luscious( abstract class Luscious(
override val name: String, override val name: String,
@ -648,10 +647,8 @@ abstract class Luscious(
private fun validYears(): List<Int>{ private fun validYears(): List<Int>{
val years = mutableListOf<Int>() val years = mutableListOf<Int>()
val current = LocalDateTime.now() val current = Calendar.getInstance()
val formatter = DateTimeFormatter.ofPattern("yyyy") val currentYear = current.get(Calendar.YEAR)
val formatted = current.format(formatter)
val currentYear = formatted.toInt()
var firstYear = 2013 var firstYear = 2013
while (currentYear != firstYear -1) { while (currentYear != firstYear -1) {
years.add(firstYear) years.add(firstYear)

View File

@ -10,7 +10,7 @@ class LusciousGenerator : ThemeSourceGenerator {
override val themeClass = "Luscious" override val themeClass = "Luscious"
override val baseVersionCode: Int = 5 override val baseVersionCode: Int = 6
override val sources = listOf( 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), 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),