Made the skip button dissappear after 5 seconds with a setting to turn it off

This commit is contained in:
JohnVictoryz
2024-03-07 17:19:00 +02:00
parent 7ac679f927
commit 57cd7595c8
5 changed files with 143 additions and 15 deletions

View File

@@ -129,6 +129,11 @@ class PlayerSettingsActivity : AppCompatActivity() {
PrefManager.setVal(PrefName.TimeStampsEnabled, isChecked)
}
binding.playerSettingsTimeStampsAutoHide.isChecked = PrefManager.getVal(PrefName.AutoHideTimeStamps)
binding.playerSettingsTimeStampsAutoHide.setOnCheckedChangeListener { _, isChecked ->
PrefManager.setVal(PrefName.AutoHideTimeStamps, isChecked)
}
binding.playerSettingsTimeStampsProxy.isChecked =
PrefManager.getVal(PrefName.UseProxyForTimeStamps)
binding.playerSettingsTimeStampsProxy.setOnCheckedChangeListener { _, isChecked ->

View File

@@ -82,6 +82,7 @@ enum class PrefName(val data: Pref) { //TODO: Split this into multiple files
FontSize(Pref(Location.Player, Int::class, 20)),
Locale(Pref(Location.Player, Int::class, 2)),
TimeStampsEnabled(Pref(Location.Player, Boolean::class, true)),
AutoHideTimeStamps(Pref(Location.Player, Boolean::class, true)),
UseProxyForTimeStamps(Pref(Location.Player, Boolean::class, false)),
ShowTimeStampButton(Pref(Location.Player, Boolean::class, true)),
AutoSkipOPED(Pref(Location.Player, Boolean::class, false)),