mirror of
https://github.com/YTVanced/VancedManager
synced 2025-01-05 06:51:00 +00:00
added a fallback for empty language list
This commit is contained in:
parent
c5f4f7a609
commit
6c0bc4e1ea
2 changed files with 13 additions and 4 deletions
|
@ -4,6 +4,7 @@ import android.content.Context
|
|||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.content.edit
|
||||
import com.vanced.manager.R
|
||||
import com.vanced.manager.core.ui.base.BindingBottomSheetDialogFragment
|
||||
import com.vanced.manager.core.ui.ext.showDialog
|
||||
|
@ -67,6 +68,14 @@ class VancedPreferencesDialog : BindingBottomSheetDialogFragment<DialogVancedPre
|
|||
showDialog(VancedLanguageSelectionDialog())
|
||||
}
|
||||
vancedInstall.setOnClickListener {
|
||||
if (showLang.isEmpty()) {
|
||||
with("en") en@ {
|
||||
showLang.add(this)
|
||||
installPrefs.edit {
|
||||
putString("lang", this@en)
|
||||
}
|
||||
}
|
||||
}
|
||||
dismiss()
|
||||
showDialog(
|
||||
AppDownloadDialog.newInstance(
|
||||
|
|
Loading…
Reference in a new issue