mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-22 21:08:15 +01:00
Better visibility for DM in notifications list close #1064
This commit is contained in:
parent
b036e90ce4
commit
d82453c513
@ -184,7 +184,7 @@ public struct ExploreView: View {
|
||||
Section("explore.section.trending.posts") {
|
||||
ForEach(viewModel.trendingStatuses
|
||||
.prefix(upTo: viewModel.trendingStatuses.count > 3 ? 3 : viewModel.trendingStatuses.count)) { status in
|
||||
StatusRowView(viewModel: { .init(status: status, client: client, routerPath: routerPath) })
|
||||
StatusRowView(viewModel: { .init(status: status, client: client, routerPath: routerPath) })
|
||||
.listRowBackground(theme.primaryBackgroundColor)
|
||||
.padding(.vertical, 8)
|
||||
}
|
||||
|
@ -55,11 +55,12 @@ struct NotificationRowView: View {
|
||||
ZStack(alignment: .center) {
|
||||
Circle()
|
||||
.strokeBorder(Color.white, lineWidth: 1)
|
||||
.background(Circle().foregroundColor(type.tintColor()))
|
||||
.background(Circle().foregroundColor(type.tintColor(isPrivate: notification.status?.visibility == .priv)))
|
||||
.frame(width: 24, height: 24)
|
||||
|
||||
Image(systemName: type.iconName())
|
||||
Image(systemName: type.iconName(isPrivate: notification.status?.visibility == .priv))
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 12, height: 12)
|
||||
.foregroundColor(.white)
|
||||
}
|
||||
|
@ -45,7 +45,10 @@ extension Models.Notification.NotificationType {
|
||||
}
|
||||
}
|
||||
|
||||
func iconName() -> String {
|
||||
func iconName(isPrivate: Bool) -> String {
|
||||
if isPrivate {
|
||||
return "tray.fill"
|
||||
}
|
||||
switch self {
|
||||
case .status:
|
||||
return "pencil"
|
||||
@ -64,7 +67,10 @@ extension Models.Notification.NotificationType {
|
||||
}
|
||||
}
|
||||
|
||||
func tintColor() -> Color {
|
||||
func tintColor(isPrivate: Bool) -> Color {
|
||||
if isPrivate {
|
||||
return Color.orange.opacity(0.80)
|
||||
}
|
||||
switch self {
|
||||
case .status, .mention, .update, .poll:
|
||||
return Theme.shared.tintColor.opacity(0.80)
|
||||
|
@ -43,7 +43,7 @@ public struct NotificationsListView: View {
|
||||
Button {
|
||||
viewModel.selectedType = type
|
||||
} label: {
|
||||
Label(type.menuTitle(), systemImage: type.iconName())
|
||||
Label(type.menuTitle(), systemImage: type.iconName(isPrivate: false))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user