diff --git a/app/src/main/java/com/vanced/manager/ui/fragments/HomeFragment.kt b/app/src/main/java/com/vanced/manager/ui/fragments/HomeFragment.kt index b75114c4..1b29b28f 100644 --- a/app/src/main/java/com/vanced/manager/ui/fragments/HomeFragment.kt +++ b/app/src/main/java/com/vanced/manager/ui/fragments/HomeFragment.kt @@ -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) } diff --git a/app/src/main/java/com/vanced/manager/ui/fragments/VancedLanguageSelectionFragment.kt b/app/src/main/java/com/vanced/manager/ui/fragments/VancedLanguageSelectionFragment.kt index 844d7a5b..e2bd16d6 100644 --- a/app/src/main/java/com/vanced/manager/ui/fragments/VancedLanguageSelectionFragment.kt +++ b/app/src/main/java/com/vanced/manager/ui/fragments/VancedLanguageSelectionFragment.kt @@ -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) diff --git a/app/src/main/java/com/vanced/manager/utils/AppUtils.kt b/app/src/main/java/com/vanced/manager/utils/AppUtils.kt index 2e86e925..57bece2d 100644 --- a/app/src/main/java/com/vanced/manager/utils/AppUtils.kt +++ b/app/src/main/java/com/vanced/manager/utils/AppUtils.kt @@ -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 { diff --git a/app/src/main/res/drawable/splash_logo.xml b/app/src/main/res/drawable/splash_logo.xml index 7415134a..7d9907fc 100644 --- a/app/src/main/res/drawable/splash_logo.xml +++ b/app/src/main/res/drawable/splash_logo.xml @@ -2,7 +2,7 @@ - +