Reuse collator instance

This commit is contained in:
MM20
2024-05-11 13:18:03 +02:00
parent 9b252cb5e8
commit 90de026e49
3 changed files with 21 additions and 6 deletions
@@ -9,9 +9,9 @@ import android.os.Process
import androidx.core.content.getSystemService
import de.mm20.launcher2.ktx.romanize
import de.mm20.launcher2.search.AppProfile
import de.mm20.launcher2.text.Collator
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flow
import java.text.Collator
class AppShortcutConfigActivity(
private val launcherActivityInfo: LauncherActivityInfo,
@@ -32,7 +32,6 @@ class AppShortcutConfigActivity(
val label1 = label
val label2 = other.label
return Collator.getInstance().apply { strength = Collator.SECONDARY }
.compare(label1.romanize(), label2.romanize())
return Collator.compare(label1.romanize(), label2.romanize())
}
}