From c5d910fa2248102d90042897a36f747652e61e6d Mon Sep 17 00:00:00 2001 From: Bnyro Date: Mon, 21 Nov 2022 15:40:15 +0100 Subject: [PATCH] Notify about updater being disabled for debug builds --- .../com/github/libretube/ui/preferences/MainSettings.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/github/libretube/ui/preferences/MainSettings.kt b/app/src/main/java/com/github/libretube/ui/preferences/MainSettings.kt index 1959ebe61..f67495781 100644 --- a/app/src/main/java/com/github/libretube/ui/preferences/MainSettings.kt +++ b/app/src/main/java/com/github/libretube/ui/preferences/MainSettings.kt @@ -1,6 +1,7 @@ package com.github.libretube.ui.preferences import android.os.Bundle +import android.widget.Toast import androidx.annotation.StringRes import androidx.fragment.app.Fragment import androidx.preference.Preference @@ -95,7 +96,10 @@ class MainSettings : BasePreferenceFragment() { // checking for update: yes -> dialog, no -> snackBar update?.setOnPreferenceClickListener { - if (BuildConfig.DEBUG) return@setOnPreferenceClickListener true + if (BuildConfig.DEBUG) { + Toast.makeText(context, "Updater is disabled for debug versions!", Toast.LENGTH_SHORT).show() + return@setOnPreferenceClickListener true + } CoroutineScope(Dispatchers.IO).launch { // check for update val updateInfo = try {