mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-28 01:31:02 +00:00
bugfixes and themes
This commit is contained in:
@@ -105,6 +105,12 @@ OS Version: $CODENAME $RELEASE ($SDK_INT)
|
||||
restartApp()
|
||||
}
|
||||
|
||||
binding.settingsUseOLED.isChecked = getSharedPreferences("Dantotsu", Context.MODE_PRIVATE).getBoolean("use_oled", false)
|
||||
binding.settingsUseOLED.setOnCheckedChangeListener { _, isChecked ->
|
||||
getSharedPreferences("Dantotsu", Context.MODE_PRIVATE).edit().putBoolean("use_oled", isChecked).apply()
|
||||
restartApp()
|
||||
}
|
||||
|
||||
val themeString = getSharedPreferences("Dantotsu", Context.MODE_PRIVATE).getString("theme", "PURPLE")!!
|
||||
binding.themeSwitcher.setText(themeString.substring(0, 1) + themeString.substring(1).lowercase())
|
||||
|
||||
@@ -408,7 +414,7 @@ OS Version: $CODENAME $RELEASE ($SDK_INT)
|
||||
}
|
||||
}
|
||||
|
||||
var curTime = loadData<Int>("subscriptions_time_r") ?: defaultTime
|
||||
var curTime = loadData<Int>("subscriptions_time_s") ?: defaultTime
|
||||
val timeNames = timeMinutes.map {
|
||||
val mins = it % 60
|
||||
val hours = it / 60
|
||||
@@ -421,7 +427,7 @@ OS Version: $CODENAME $RELEASE ($SDK_INT)
|
||||
speedDialog.setSingleChoiceItems(timeNames, curTime) { dialog, i ->
|
||||
curTime = i
|
||||
binding.settingsSubscriptionsTime.text = getString(R.string.subscriptions_checking_time_s, timeNames[i])
|
||||
saveData("subscriptions_time_r", curTime)
|
||||
saveData("subscriptions_time_s", curTime)
|
||||
dialog.dismiss()
|
||||
startSubscription(true)
|
||||
}.show()
|
||||
|
||||
Reference in New Issue
Block a user