Skip to content

Commit cd7535d

Browse files
ohassinesbakhtiarovGarzassaleniukyamilmedina
authored
feat: Display tags by alphabetical order (WPB-21606) (#4407)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Sergey Bakhtiarov <[email protected]> Co-authored-by: Jakub Żerko <[email protected]> Co-authored-by: Michał Saleniuk <[email protected]> Co-authored-by: Yamil Medina <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: AndroidBob <[email protected]> Co-authored-by: Mohamad Jaara <[email protected]>
1 parent a69c4ba commit cd7535d

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

features/cells/src/main/java/com/wire/android/feature/cells/ui/CellViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ class CellViewModel @Inject constructor(
532532
}
533533

534534
suspend fun loadTags() {
535-
getAllTagsUseCase().onSuccess { updated -> _tags.update { updated } }
535+
getAllTagsUseCase().onSuccess { updated -> _tags.update { updated.sorted().toSet() } }
536536
// apply delay to avoid too frequent requests
537537
delay(30.seconds)
538538
}

features/cells/src/main/java/com/wire/android/feature/cells/ui/tags/AddRemoveTagsViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class AddRemoveTagsViewModel @Inject constructor(
6666
private val _suggestedTags = MutableStateFlow<Set<String>>(emptySet())
6767
internal val suggestedTags =
6868
allTags.combine(addedTags) { all, added ->
69-
all.filter { it !in added }.toSet()
69+
all.filter { it !in added }.toSet().sorted()
7070
}.stateIn(viewModelScope, SharingStarted.WhileSubscribed(), emptySet())
7171

7272
init {

features/cells/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@
120120
<string name="no_tags_message">No tags were added yet.</string>
121121
<string name="tags_edited">Tags were edited</string>
122122
<string name="failed_edit_tags">Unable to add or remove tags</string>
123+
<string name="create_folder_invalid_name">Use a name without "/"</string>
123124
<string name="file_list_empty_title">There are no files or folders yet</string>
124125
<string name="no_results_found_label">No results found</string>
125126
<string name="filters_try_adjusting_your_filters_label">Try adjusting your filters.</string>

0 commit comments

Comments
 (0)