From 326573659c5716aac5a83cdca162511ed452a57b Mon Sep 17 00:00:00 2001 From: Bnyro Date: Tue, 23 Aug 2022 15:53:12 +0200 Subject: [PATCH] fixes --- .../main/java/com/github/libretube/activities/MainActivity.kt | 4 +++- .../com/github/libretube/views/MaterialPreferenceFragment.kt | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/github/libretube/activities/MainActivity.kt b/app/src/main/java/com/github/libretube/activities/MainActivity.kt index a4515e054..2d7876eac 100644 --- a/app/src/main/java/com/github/libretube/activities/MainActivity.kt +++ b/app/src/main/java/com/github/libretube/activities/MainActivity.kt @@ -171,7 +171,9 @@ class MainActivity : BaseActivity() { PreferenceKeys.BREAK_REMINDER, "0" ) - if (!breakReminderPref.all { Character.isDigit(it) }) return + if (!breakReminderPref.all { Character.isDigit(it) } || + breakReminderPref == "" || breakReminderPref == "0" + ) return Handler(Looper.getMainLooper()).postDelayed( { try { diff --git a/app/src/main/java/com/github/libretube/views/MaterialPreferenceFragment.kt b/app/src/main/java/com/github/libretube/views/MaterialPreferenceFragment.kt index 3f420dd38..0aefcd3a6 100644 --- a/app/src/main/java/com/github/libretube/views/MaterialPreferenceFragment.kt +++ b/app/src/main/java/com/github/libretube/views/MaterialPreferenceFragment.kt @@ -1,14 +1,12 @@ package com.github.libretube.views import android.os.Bundle -import android.util.Log import androidx.preference.EditTextPreference import androidx.preference.ListPreference import androidx.preference.Preference import androidx.preference.PreferenceFragmentCompat import com.github.libretube.R import com.github.libretube.databinding.DialogTextPreferenceBinding -import com.github.libretube.extensions.TAG import com.github.libretube.preferences.PreferenceHelper import com.google.android.material.dialog.MaterialAlertDialogBuilder