Prevent firing icon shape change at start
This commit is contained in:
@@ -36,6 +36,8 @@ import com.android.launcher3.util.MainThreadInitializedObject
|
||||
import com.patrykmichalik.preferencemanager.PreferenceManager
|
||||
import com.patrykmichalik.preferencemanager.firstBlocking
|
||||
import kotlinx.coroutines.MainScope
|
||||
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||
import kotlinx.coroutines.flow.drop
|
||||
import kotlinx.coroutines.flow.launchIn
|
||||
import kotlinx.coroutines.flow.onEach
|
||||
import app.lawnchair.preferences.PreferenceManager as LawnchairPreferenceManager
|
||||
@@ -277,6 +279,8 @@ class PreferenceManager2(private val context: Context) : PreferenceManager {
|
||||
init {
|
||||
initializeIconShape(iconShape.firstBlocking())
|
||||
iconShape.get()
|
||||
.drop(1)
|
||||
.distinctUntilChanged()
|
||||
.onEach { shape ->
|
||||
initializeIconShape(shape)
|
||||
L3IconShape.init(context)
|
||||
|
||||
Reference in New Issue
Block a user