Add icons for all filters
This commit is contained in:
parent
781121d1d4
commit
0497191acf
|
@ -189,7 +189,7 @@ struct TimelineTab: View {
|
|||
Button {
|
||||
timeline = .latest
|
||||
} label: {
|
||||
Label(TimelineFilter.latest.localizedTitle(), systemImage: TimelineFilter.latest.iconName() ?? "")
|
||||
Label(TimelineFilter.latest.localizedTitle(), systemImage: TimelineFilter.latest.iconName())
|
||||
}
|
||||
if timeline == .home {
|
||||
Button {
|
||||
|
@ -197,7 +197,7 @@ struct TimelineTab: View {
|
|||
} label: {
|
||||
VStack {
|
||||
Label(TimelineFilter.resume.localizedTitle(),
|
||||
systemImage: TimelineFilter.resume.iconName() ?? "")
|
||||
systemImage: TimelineFilter.resume.iconName())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ struct TimelineTab: View {
|
|||
Button {
|
||||
self.timeline = timeline
|
||||
} label: {
|
||||
Label(timeline.localizedTitle(), systemImage: timeline.iconName() ?? "")
|
||||
Label(timeline.localizedTitle(), systemImage: timeline.iconName())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ public enum TimelineFilter: Hashable, Equatable, Identifiable {
|
|||
}
|
||||
}
|
||||
|
||||
public func iconName() -> String? {
|
||||
public func iconName() -> String {
|
||||
switch self {
|
||||
case .latest:
|
||||
"arrow.counterclockwise"
|
||||
|
@ -133,8 +133,10 @@ public enum TimelineFilter: Hashable, Equatable, Identifiable {
|
|||
"list.bullet"
|
||||
case .remoteLocal:
|
||||
"dot.radiowaves.right"
|
||||
default:
|
||||
nil
|
||||
case .tagGroup:
|
||||
"tag"
|
||||
case .hashtag:
|
||||
"number"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ struct TimelineQuickAccessPills: View {
|
|||
Button {
|
||||
timeline = filter
|
||||
} label: {
|
||||
Label(filter.localizedTitle(), systemImage: filter.iconName() ?? "")
|
||||
Label(filter.localizedTitle(), systemImage: filter.iconName())
|
||||
.font(.callout)
|
||||
}
|
||||
.transition(.push(from: .leading).combined(with: .opacity))
|
||||
|
|
Loading…
Reference in New Issue