mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-18 13:16:49 +00:00
Sort lists and tags in timeline filter button menus (#370)
Sorted alphabetically by list.title and tag.name
This commit is contained in:
parent
f636b94178
commit
06c7e0e324
1 changed files with 4 additions and 2 deletions
|
@ -83,8 +83,9 @@ struct TimelineTab: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !currentAccount.lists.isEmpty {
|
if !currentAccount.lists.isEmpty {
|
||||||
|
let sortedLists = currentAccount.lists.sorted { $0.title < $1.title }
|
||||||
Menu("timeline.filter.lists") {
|
Menu("timeline.filter.lists") {
|
||||||
ForEach(currentAccount.lists) { list in
|
ForEach(sortedLists) { list in
|
||||||
Button {
|
Button {
|
||||||
timeline = .list(list: list)
|
timeline = .list(list: list)
|
||||||
} label: {
|
} label: {
|
||||||
|
@ -95,8 +96,9 @@ struct TimelineTab: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
if !currentAccount.tags.isEmpty {
|
if !currentAccount.tags.isEmpty {
|
||||||
|
let sortedTags = currentAccount.tags.sorted { $0.name < $1.name }
|
||||||
Menu("timeline.filter.tags") {
|
Menu("timeline.filter.tags") {
|
||||||
ForEach(currentAccount.tags) { tag in
|
ForEach(sortedTags) { tag in
|
||||||
Button {
|
Button {
|
||||||
timeline = .hashtag(tag: tag.name, accountId: nil)
|
timeline = .hashtag(tag: tag.name, accountId: nil)
|
||||||
} label: {
|
} label: {
|
||||||
|
|
Loading…
Reference in a new issue