Add more checking frequencies, use DurationListPreference

This commit is contained in:
Stypox 2022-01-24 10:12:25 +01:00
parent 0397a3120f
commit 40ea51e622
No known key found for this signature in database
GPG key ID: 4BDF1B40A49FDD23
5 changed files with 22 additions and 26 deletions

View file

@ -19,10 +19,10 @@ data class ScheduleOptions(
fun from(context: Context): ScheduleOptions {
val preferences = PreferenceManager.getDefaultSharedPreferences(context)
return ScheduleOptions(
interval = TimeUnit.HOURS.toMillis(
interval = TimeUnit.SECONDS.toMillis(
preferences.getString(
context.getString(R.string.streams_notifications_interval_key),
context.getString(R.string.streams_notifications_interval_default)
null
)?.toLongOrNull() ?: context.getString(
R.string.streams_notifications_interval_default
).toLong()