Skip to content

Commit 0fa5cde

Browse files
committed
Merge remote-tracking branch 'origin/feature/more-event-types' into develop
2 parents dcfed91 + 5098f6a commit 0fa5cde

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Modules/Sources/NotificationsClient/NotificationsClient.swift

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,24 @@ extension NotificationsClient: DependencyKey {
128128
case 2:
129129
// Last message, unused
130130
return false
131+
case 3:
132+
// User mention, processing in showUnreadNotifications
133+
return false
134+
case 4:
135+
// Hat update
136+
subject.send(.topic(notification.id))
131137
default:
132138
analyticsClient.capture(EventError.unknownFlag(notificationRaw))
133139
return false
134140
}
135141

136142
case .forum:
137143
switch notification.flag {
138-
case 2:
144+
case 1:
139145
subject.send(.forum(notification.id))
146+
case 2:
147+
// Silent update, unused
148+
return false
140149
default:
141150
analyticsClient.capture(EventError.unknownFlag(notificationRaw))
142151
return false
@@ -224,7 +233,7 @@ extension NotificationsClient: DependencyKey {
224233
content.title = "Новое на форуме"
225234
content.body = item.name
226235
case .topic:
227-
content.title = "\(item.authorName.convertCodes()) в теме"
236+
content.title = item.unreadCount & 4 != 0 ? "Обновилась шапка" : "\(item.authorName.convertCodes()) в теме"
228237
content.body = item.name
229238
case .forumMention:
230239
content.title = "Упоминание в теме \(item.name)"

0 commit comments

Comments
 (0)