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 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<Int>{
val years = mutableListOf<Int>()
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)

View File

@ -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),