mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 06:10:31 +05:30
Merge pull request #1962 from Bnyro/master
Notify about updater being disabled for debug builds
This commit is contained in:
commit
6b147b43a3
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user