0
0
Fork 0
mirror of https://github.com/YTVanced/VancedManager synced 2025-01-06 23:41:00 +00:00

added a fallback for empty language list

This commit is contained in:
X1nto 2020-12-22 23:23:18 +04:00
parent c5f4f7a609
commit 6c0bc4e1ea
2 changed files with 13 additions and 4 deletions

View file

@ -4,6 +4,7 @@ import android.content.Context
import android.os.Bundle import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.ViewGroup import android.view.ViewGroup
import androidx.core.content.edit
import com.vanced.manager.R import com.vanced.manager.R
import com.vanced.manager.core.ui.base.BindingBottomSheetDialogFragment import com.vanced.manager.core.ui.base.BindingBottomSheetDialogFragment
import com.vanced.manager.core.ui.ext.showDialog import com.vanced.manager.core.ui.ext.showDialog
@ -67,6 +68,14 @@ class VancedPreferencesDialog : BindingBottomSheetDialogFragment<DialogVancedPre
showDialog(VancedLanguageSelectionDialog()) showDialog(VancedLanguageSelectionDialog())
} }
vancedInstall.setOnClickListener { vancedInstall.setOnClickListener {
if (showLang.isEmpty()) {
with("en") en@ {
showLang.add(this)
installPrefs.edit {
putString("lang", this@en)
}
}
}
dismiss() dismiss()
showDialog( showDialog(
AppDownloadDialog.newInstance( AppDownloadDialog.newInstance(