Avoid creating a new Collator and apply same decomposition across codebase.
This commit is contained in:
parent
8ee2361102
commit
0b313f1209
1 changed files with 5 additions and 1 deletions
|
|
@ -49,6 +49,10 @@ class EditDefaultNotificationSettingPresenter(
|
|||
fun create(oneToOne: Boolean): EditDefaultNotificationSettingPresenter
|
||||
}
|
||||
|
||||
private val collator = Collator.getInstance().apply {
|
||||
decomposition = Collator.CANONICAL_DECOMPOSITION
|
||||
}
|
||||
|
||||
@Composable
|
||||
override fun present(): EditDefaultNotificationSettingState {
|
||||
var displayMentionsOnlyDisclaimer by remember { mutableStateOf(false) }
|
||||
|
|
@ -139,7 +143,7 @@ class EditDefaultNotificationSettingPresenter(
|
|||
}
|
||||
// locale sensitive sorting
|
||||
.sortedWith(
|
||||
compareBy(Collator.getInstance()) { roomSummary ->
|
||||
compareBy(collator) { roomSummary ->
|
||||
// Collator does not handle null values, so we provide a fallback
|
||||
roomSummary.name ?: roomSummary.roomId.value
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue