mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-26 00:50:38 +00:00
Notifications: fix rocket icon
This commit is contained in:
parent
9ebe0b314c
commit
54198c877f
3 changed files with 15 additions and 11 deletions
|
@ -58,7 +58,7 @@ struct NotificationRowView: View {
|
|||
.background(Circle().foregroundColor(type.tintColor(isPrivate: notification.status?.visibility == .direct)))
|
||||
.frame(width: 24, height: 24)
|
||||
|
||||
Image(systemName: type.iconName(isPrivate: notification.status?.visibility == .direct))
|
||||
type.icon(isPrivate: notification.status?.visibility == .direct)
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 12, height: 12)
|
||||
|
|
|
@ -45,25 +45,25 @@ extension Models.Notification.NotificationType {
|
|||
}
|
||||
}
|
||||
|
||||
func iconName(isPrivate: Bool) -> String {
|
||||
func icon(isPrivate: Bool) -> Image {
|
||||
if isPrivate {
|
||||
return "tray.fill"
|
||||
return Image(systemName:"tray.fill")
|
||||
}
|
||||
switch self {
|
||||
case .status:
|
||||
return "pencil"
|
||||
return Image(systemName:"pencil")
|
||||
case .mention:
|
||||
return "at"
|
||||
return Image(systemName:"at")
|
||||
case .reblog:
|
||||
return "Rocket.Fill"
|
||||
return Image("Rocket.Fill")
|
||||
case .follow, .follow_request:
|
||||
return "person.fill.badge.plus"
|
||||
return Image(systemName:"person.fill.badge.plus")
|
||||
case .favourite:
|
||||
return "star.fill"
|
||||
return Image(systemName:"star.fill")
|
||||
case .poll:
|
||||
return "chart.bar.fill"
|
||||
return Image(systemName:"chart.bar.fill")
|
||||
case .update:
|
||||
return "pencil.line"
|
||||
return Image(systemName:"pencil.line")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,11 @@ public struct NotificationsListView: View {
|
|||
Button {
|
||||
viewModel.selectedType = type
|
||||
} label: {
|
||||
Label(type.menuTitle(), systemImage: type.iconName(isPrivate: false))
|
||||
Label {
|
||||
Text(type.menuTitle())
|
||||
} icon: {
|
||||
type.icon(isPrivate: false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue