mirror of
https://github.com/Corewala/Buran
synced 2025-01-03 05:34:28 +00:00
Hide update checks if installed from repository
This commit is contained in:
parent
76145f80d5
commit
0b97d239c4
2 changed files with 9 additions and 1 deletions
|
@ -185,10 +185,11 @@ class GemActivity : AppCompatActivity() {
|
|||
)
|
||||
}
|
||||
|
||||
val isSideLoaded = packageManager.getInstallerPackageName(BuildConfig.APPLICATION_ID).isNullOrEmpty()
|
||||
if(PreferenceManager.getDefaultSharedPreferences(this).getBoolean(
|
||||
"check_for_updates",
|
||||
false
|
||||
)) {
|
||||
) and isSideLoaded) {
|
||||
val updates = BuranUpdates()
|
||||
val latestVersion = updates.getLatestVersion()
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ import android.view.inputmethod.EditorInfo
|
|||
import androidx.appcompat.app.AppCompatDelegate
|
||||
import androidx.biometric.BiometricPrompt
|
||||
import androidx.preference.*
|
||||
import corewala.buran.BuildConfig
|
||||
import corewala.buran.Buran
|
||||
import corewala.buran.R
|
||||
import corewala.buran.io.keymanager.BuranBiometricManager
|
||||
|
@ -98,6 +99,12 @@ class SettingsFragment: PreferenceFragmentCompat(), Preference.OnPreferenceChang
|
|||
checkForUpdates.title = getString(R.string.check_for_updates)
|
||||
appCategory.addPreference(checkForUpdates)
|
||||
|
||||
val isSideLoaded = context.packageManager.getInstallerPackageName(BuildConfig.APPLICATION_ID).isNullOrEmpty()
|
||||
checkForUpdates.isVisible = isSideLoaded
|
||||
if(!isSideLoaded){
|
||||
checkForUpdates.equals(false)
|
||||
}
|
||||
|
||||
//Certificates
|
||||
buildClientCertificateSection(context, screen)
|
||||
|
||||
|
|
Loading…
Reference in a new issue