mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 23:36:47 +00:00
Improve how icons are reloaded when alwaysReloadIcons is enabled
Co-authored-by: Daria Hamrah Paytakht <info@dariarnd.ir>
This commit is contained in:
@@ -394,16 +394,14 @@ class LawnchairLauncher : QuickstepLauncher(), LifecycleOwner,
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the value of [PreferenceManager.iconPackPackage] to force reload icons in the launcher.
|
||||
* Only reloads icons if there is an active icon pack & [PreferenceManager2.alwaysReloadIcons] is enabled.
|
||||
* Reloads app icons if there is an active icon pack & [PreferenceManager2.alwaysReloadIcons] is enabled.
|
||||
*/
|
||||
private fun reloadIconsIfNeeded() {
|
||||
if (preferenceManager2.alwaysReloadIcons.firstBlocking()) {
|
||||
val iconPack = prefs.iconPackPackage.get()
|
||||
if (iconPack != "") {
|
||||
prefs.iconPackPackage.set("")
|
||||
prefs.iconPackPackage.set(iconPack)
|
||||
}
|
||||
if (
|
||||
preferenceManager2.alwaysReloadIcons.firstBlocking() &&
|
||||
prefs.iconPackPackage.get() != ""
|
||||
) {
|
||||
LauncherAppState.getInstance(this).reloadIcons()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user