|
|
|
@ -642,7 +642,8 @@ class NotificationActionHandler {
|
|
|
|
|
|
|
|
|
|
func showThread(userInfo: [AnyHashable: Any]) throws -> Promise<Void> {
|
|
|
|
|
guard let threadId = userInfo[AppNotificationUserInfoKey.threadId] as? String else {
|
|
|
|
|
throw NotificationError.failDebug("threadId was unexpectedly nil")
|
|
|
|
|
return showHomePage()
|
|
|
|
|
// throw NotificationError.failDebug("threadId was unexpectedly nil")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// If this happens when the the app is not, visible we skip the animation so the thread
|
|
|
|
@ -653,6 +654,11 @@ class NotificationActionHandler {
|
|
|
|
|
return Promise.value(())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func showHomePage() -> Promise<Void> {
|
|
|
|
|
signalApp.showHomeView()
|
|
|
|
|
return Promise.value(())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private func markAsRead(thread: TSThread) -> Promise<Void> {
|
|
|
|
|
return dbConnection.readWritePromise { transaction in
|
|
|
|
|
thread.markAllAsRead(with: transaction)
|
|
|
|
|