fixed warnings for music and vanced
This commit is contained in:
parent
3a4fa0abe0
commit
d58a2c3f71
|
@ -45,10 +45,10 @@ class InstallationFilesDetectedDialog : BindingBottomSheetDialogFragment<DialogI
|
|||
installationDetectedSummary.text = getString(R.string.app_install_files_detected_summary, app)
|
||||
installationDetectedRedownload.setOnClickListener {
|
||||
dismiss()
|
||||
if (app == getString(R.string.vanced))
|
||||
showDialog(VancedPreferencesDialog())
|
||||
else {
|
||||
showDialog(AppDownloadDialog.newInstance(app))
|
||||
when (app) {
|
||||
getString(R.string.vanced) -> showDialog(VancedPreferencesDialog())
|
||||
getString(R.string.music) -> showDialog(MusicPreferencesDialog())
|
||||
else -> showDialog(AppDownloadDialog.newInstance(app))
|
||||
}
|
||||
}
|
||||
installationDetectedInstall.setOnClickListener {
|
||||
|
|
|
@ -20,7 +20,6 @@ class MusicPreferencesDialog : BindingBottomSheetDialogFragment<DialogMusicPrefe
|
|||
}
|
||||
|
||||
private val prefs by lazy { requireActivity().defPrefs }
|
||||
private val installPrefs by lazy { requireActivity().installPrefs }
|
||||
|
||||
override fun binding(
|
||||
inflater: LayoutInflater,
|
||||
|
@ -36,7 +35,7 @@ class MusicPreferencesDialog : BindingBottomSheetDialogFragment<DialogMusicPrefe
|
|||
with(binding) {
|
||||
val musicVersionsConv = musicVersions.value?.value?.convertToAppVersions()
|
||||
musicInstallTitle.text = getString(R.string.app_installation_preferences, getString(R.string.music))
|
||||
musicVersion.text = getString(R.string.chosen_version, prefs.getString("music_version", "latest")?.formatVersion(requireActivity()))
|
||||
musicVersion.text = getString(R.string.chosen_version, prefs.musicVersion?.formatVersion(requireActivity()))
|
||||
openVersionSelector.setOnClickListener {
|
||||
dismiss()
|
||||
showDialog(
|
||||
|
@ -47,8 +46,8 @@ class MusicPreferencesDialog : BindingBottomSheetDialogFragment<DialogMusicPrefe
|
|||
)
|
||||
}
|
||||
musicInstall.setOnClickListener {
|
||||
dismiss()
|
||||
fun downloadMusic(version: String? = null) {
|
||||
dismiss()
|
||||
showDialog(
|
||||
AppDownloadDialog.newInstance(
|
||||
app = getString(R.string.music),
|
||||
|
@ -56,10 +55,8 @@ class MusicPreferencesDialog : BindingBottomSheetDialogFragment<DialogMusicPrefe
|
|||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
if (prefs.managerVariant == "nonroot" && isMicrogBroken && installPrefs.musicVersion?.getLatestAppVersion(
|
||||
vancedVersions.value?.value ?: listOf(""))?.take(3)?.toIntOrNull() ?: 0 >= 411 && !PackageHelper.isPackageInstalled(
|
||||
if (prefs.managerVariant == "nonroot" && isMicrogBroken && prefs.musicVersion?.getLatestAppVersion(musicVersions.value?.value ?: listOf(""))?.replace(".", "")?.take(3)?.toIntOrNull() ?: 0 >= 411 &&
|
||||
!PackageHelper.isPackageInstalled(
|
||||
AppUtils.musicPkg,
|
||||
requireActivity().packageManager
|
||||
)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.vanced.manager.ui.dialogs
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
|
@ -45,8 +44,8 @@ class VancedPreferencesDialog : BindingBottomSheetDialogFragment<DialogVancedPre
|
|||
}
|
||||
val vancedVersionsConv = vancedVersions.value?.value?.convertToAppVersions()
|
||||
vancedInstallTitle.text = getString(R.string.app_installation_preferences, getString(R.string.vanced))
|
||||
vancedTheme.text = getString(R.string.chosen_theme, installPrefs.getString("theme", "dark")?.convertToAppTheme(requireActivity()))
|
||||
vancedVersion.text = getString(R.string.chosen_version, defPrefs.getString("vanced_version", "latest")?.formatVersion(requireActivity()))
|
||||
vancedTheme.text = getString(R.string.chosen_theme, installPrefs.theme?.convertToAppTheme(requireActivity()))
|
||||
vancedVersion.text = getString(R.string.chosen_version, defPrefs.vancedVersion?.formatVersion(requireActivity()))
|
||||
vancedLang.text = getString(R.string.chosen_lang, showLang)
|
||||
openThemeSelector.setOnClickListener {
|
||||
dismiss()
|
||||
|
@ -80,7 +79,7 @@ class VancedPreferencesDialog : BindingBottomSheetDialogFragment<DialogVancedPre
|
|||
)
|
||||
}
|
||||
|
||||
if (defPrefs.managerVariant == "nonroot" && isMicrogBroken && installPrefs.vancedVersion?.getLatestAppVersion(vancedVersions.value?.value ?: listOf(""))?.take(2)?.toIntOrNull() == 16 && !isPackageInstalled(vancedPkg, requireActivity().packageManager)) {
|
||||
if (defPrefs.managerVariant == "nonroot" && isMicrogBroken && defPrefs.vancedVersion?.getLatestAppVersion(vancedVersions.value?.value ?: listOf(""))?.take(2)?.toIntOrNull() == 16 && !isPackageInstalled(vancedPkg, requireActivity().packageManager)) {
|
||||
MaterialAlertDialogBuilder(requireActivity()).apply {
|
||||
setTitle(R.string.microg_bug)
|
||||
setMessage(R.string.microg_bug_summary)
|
||||
|
|
Loading…
Reference in New Issue