feat: AlarmManager option for notifications

This commit is contained in:
rebelonion 2024-03-18 23:51:00 -05:00
parent deeefb8e35
commit 9471683501
17 changed files with 822 additions and 432 deletions

View file

@ -24,6 +24,7 @@ object PrefManager {
private var protectedPreferences: SharedPreferences? = null
fun init(context: Context) { //must be called in Application class or will crash
if (generalPreferences != null) return
generalPreferences =
context.getSharedPreferences(Location.General.location, Context.MODE_PRIVATE)
uiPreferences =

View file

@ -38,6 +38,7 @@ enum class PrefName(val data: Pref) { //TODO: Split this into multiple files
AnilistNotificationInterval(Pref(Location.General, Int::class, 3)),
LastAnilistNotificationId(Pref(Location.General, Int::class, 0)),
AnilistFilteredTypes(Pref(Location.General, Set::class, setOf<String>())),
UseAlarmManager(Pref(Location.General, Boolean::class, false)),
//User Interface
UseOLED(Pref(Location.UI, Boolean::class, false)),