|
|
|
@ -225,15 +225,17 @@ NSString *const Signal_Message_MarkAsRead_Identifier = @"Signal_Message_MarkAsRe
|
|
|
|
|
NSString *threadId = userInfo[Signal_Thread_UserInfo_Key];
|
|
|
|
|
|
|
|
|
|
TSThread *thread = [TSThread fetchObjectWithUniqueID:threadId];
|
|
|
|
|
[[TSStorageManager sharedManager]
|
|
|
|
|
.dbConnection asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) {
|
|
|
|
|
[thread markAllAsReadWithTransaction:transaction];
|
|
|
|
|
}
|
|
|
|
|
[[TSStorageManager sharedManager].dbConnection
|
|
|
|
|
asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) {
|
|
|
|
|
// TODO: I suspect we only want to mark the message in
|
|
|
|
|
// question as read.
|
|
|
|
|
[thread markAllAsReadWithTransaction:transaction];
|
|
|
|
|
}
|
|
|
|
|
completionBlock:^{
|
|
|
|
|
[[[Environment getCurrent] signalsViewController] updateInboxCountLabel];
|
|
|
|
|
[self cancelNotificationsWithThreadId:threadId];
|
|
|
|
|
[[[Environment getCurrent] signalsViewController] updateInboxCountLabel];
|
|
|
|
|
[self cancelNotificationsWithThreadId:threadId];
|
|
|
|
|
|
|
|
|
|
completionHandler();
|
|
|
|
|
completionHandler();
|
|
|
|
|
}];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|