mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-30 06:53:01 +00:00
bug fixes
This commit is contained in:
parent
090b816cd7
commit
82626a4f19
4 changed files with 13 additions and 6 deletions
|
@ -228,7 +228,13 @@ class HomeFragment : Fragment(), View.OnClickListener {
|
|||
launchVanced(requireActivity())
|
||||
}
|
||||
MICROG_INSTALLED -> binding.includeMicrogLayout.microgInstalling.visibility = View.GONE
|
||||
INSTALL_FAILED -> installAlertBuilder(intent.getStringExtra("errorMsg") as String, requireActivity())
|
||||
INSTALL_FAILED -> {
|
||||
with(binding) {
|
||||
includeMicrogLayout.microgInstalling.visibility = View.GONE
|
||||
includeVancedLayout.vancedInstalling.visibility = View.GONE
|
||||
}
|
||||
installAlertBuilder(intent.getStringExtra("errorMsg") as String, requireActivity())
|
||||
}
|
||||
REFRESH_HOME -> {
|
||||
Log.d("VMRefresh", "Refreshing home page")
|
||||
viewModel.fetchData()
|
||||
|
@ -246,6 +252,7 @@ class HomeFragment : Fragment(), View.OnClickListener {
|
|||
intentFilter.addAction(VANCED_INSTALLED)
|
||||
intentFilter.addAction(MICROG_INSTALLED)
|
||||
intentFilter.addAction(REFRESH_HOME)
|
||||
intentFilter.addAction(INSTALL_FAILED)
|
||||
localBroadcastManager.registerReceiver(broadcastReceiver, intentFilter)
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ class VancedLanguageSelectionFragment : Fragment() {
|
|||
}
|
||||
activity?.getSharedPreferences("installPrefs", Context.MODE_PRIVATE)?.edit()?.apply {
|
||||
putString("lang", chosenLangs.joinToString())?.apply()
|
||||
putBoolean("valuesModified", true)
|
||||
putBoolean("valuesModified", true).apply()
|
||||
}
|
||||
activity?.startService(Intent(activity, VancedDownloadService::class.java))
|
||||
view.findNavController().navigate(R.id.action_installTo_homeFragment)
|
||||
|
|
|
@ -36,9 +36,9 @@ object AppUtils {
|
|||
}
|
||||
|
||||
fun sendFailure(context: Context, status: Int) {
|
||||
val mIntent = Intent(HomeFragment.INSTALL_FAILED)
|
||||
mIntent.putExtra("errorMsg", getErrorMessage(status, context))
|
||||
LocalBroadcastManager.getInstance(context).sendBroadcast(mIntent)
|
||||
val intent = Intent(HomeFragment.INSTALL_FAILED)
|
||||
intent.putExtra("errorMsg", getErrorMessage(status, context))
|
||||
LocalBroadcastManager.getInstance(context).sendBroadcast(intent)
|
||||
}
|
||||
|
||||
private fun getErrorMessage(status: Int, context: Context): String {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<layer-list
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="?colorSurface" />
|
||||
<item android:drawable="#111111" />
|
||||
|
||||
<item>
|
||||
<bitmap
|
||||
|
|
Loading…
Reference in a new issue