Confirm changing user icon in dialog

Disable API on deactivate
Fix changing theme
Fix auth in app installer
This commit is contained in:
BinTianqi
2025-02-15 19:14:38 +08:00
parent 44d2ab7e2e
commit 7995bfbdfe
11 changed files with 131 additions and 196 deletions

View File

@@ -241,7 +241,8 @@ class AppInstallerViewModel(application: Application): AndroidViewModel(applicat
val writtenPackages = MutableStateFlow(setOf<Uri>())
val writingPackage = MutableStateFlow<Uri?>(null)
fun startInstallationProcess(activity: FragmentActivity) {
startAuth(activity, object : BiometricPrompt.AuthenticationCallback() {
val sp = SharedPrefs(getApplication<Application>())
if(sp.auth) startAuth(activity, object : BiometricPrompt.AuthenticationCallback() {
override fun onAuthenticationSucceeded(result: BiometricPrompt.AuthenticationResult) {
super.onAuthenticationSucceeded(result)
startInstall()
@@ -251,6 +252,7 @@ class AppInstallerViewModel(application: Application): AndroidViewModel(applicat
Toast.makeText(activity, R.string.failed_to_authenticate, Toast.LENGTH_SHORT).show()
}
})
else startInstall()
}
private fun startInstall() {
if(installing.value) return