mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Disable Local Push Notifications + Start Handling invite notifications (#882)
* disabled local pushes and fixed the issue with the image rendering * disabled local notifications for now and started implementing invite notificatons * disabled local notifications for now and started implementing invite notificatons * removed code that should not have changed * removed useless comment * refactored name for category * fixed a test * fix * fix for missing try await * pr comments
This commit is contained in:
@@ -110,8 +110,10 @@ class ClientProxy: ClientProxyProtocol {
|
||||
client.setDelegate(delegate: delegate)
|
||||
|
||||
// Set up sync listener for generating local notifications.
|
||||
await Task.dispatch(on: clientQueue) {
|
||||
client.setNotificationDelegate(notificationDelegate: delegate)
|
||||
if ServiceLocator.shared.settings.enableLocalPushNotifications {
|
||||
await Task.dispatch(on: clientQueue) {
|
||||
client.setNotificationDelegate(notificationDelegate: delegate)
|
||||
}
|
||||
}
|
||||
|
||||
configureSlidingSync()
|
||||
@@ -326,7 +328,9 @@ class ClientProxy: ClientProxyProtocol {
|
||||
buildAndConfigureVisibleRoomsSlidingSyncList()
|
||||
buildAndConfigureAllRoomsSlidingSyncList()
|
||||
buildAndConfigureInvitesSlidingSyncList()
|
||||
buildAndConfigureNotificationsSlidingSyncList()
|
||||
if ServiceLocator.shared.settings.enableLocalPushNotifications {
|
||||
buildAndConfigureNotificationsSlidingSyncList()
|
||||
}
|
||||
|
||||
guard let visibleRoomsListBuilder else {
|
||||
MXLog.error("Visible rooms sliding sync view unavailable")
|
||||
@@ -537,11 +541,13 @@ class ClientProxy: ClientProxyProtocol {
|
||||
MXLog.error("Invites sliding sync view unavailable")
|
||||
}
|
||||
|
||||
if let notificationsListBuilder {
|
||||
MXLog.info("Registering notifications view")
|
||||
_ = slidingSync?.addList(listBuilder: notificationsListBuilder)
|
||||
} else {
|
||||
MXLog.error("Notifications sliding sync view unavailable")
|
||||
if ServiceLocator.shared.settings.enableLocalPushNotifications {
|
||||
if let notificationsListBuilder {
|
||||
MXLog.info("Registering notifications view")
|
||||
_ = slidingSync?.addList(listBuilder: notificationsListBuilder)
|
||||
} else {
|
||||
MXLog.error("Notifications sliding sync view unavailable")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user