diff --git a/Riot/Utils/Widgets/WidgetManager.h b/Riot/Utils/Widgets/WidgetManager.h index 828b2975b..3e20e5a32 100644 --- a/Riot/Utils/Widgets/WidgetManager.h +++ b/Riot/Utils/Widgets/WidgetManager.h @@ -31,9 +31,10 @@ FOUNDATION_EXPORT NSString *const kWidgetEventTypeString; FOUNDATION_EXPORT NSString *const kWidgetTypeJitsi; /** - Posted when a widget has been created, updated or removed. + Posted when a widget has been created, updated or disabled. + The notification object is the `Widget` instance. */ -FOUNDATION_EXPORT NSString *const kMXKWidgetManagerDidUpdateWidgetNotification; +FOUNDATION_EXPORT NSString *const kWidgetManagerDidUpdateWidgetNotification; /** `WidgetManager` NSError domain and codes. @@ -131,7 +132,7 @@ WidgetManagerErrorCode; /** Add/remove matrix session. - Registering session allows to generate `kMXKWidgetManagerDidUpdateWidgetNotification` notifications. + Registering session allows to generate `kWidgetManagerDidUpdateWidgetNotification` notifications. @param mxSession the session to add/remove. */ diff --git a/Riot/Utils/Widgets/WidgetManager.m b/Riot/Utils/Widgets/WidgetManager.m index c3746685a..19cdf3df1 100644 --- a/Riot/Utils/Widgets/WidgetManager.m +++ b/Riot/Utils/Widgets/WidgetManager.m @@ -21,7 +21,7 @@ NSString *const kWidgetEventTypeString = @"im.vector.modular.widgets"; NSString *const kWidgetTypeJitsi = @"jitsi"; -NSString *const kMXKWidgetManagerDidUpdateWidgetNotification = @"kMXKWidgetManagerDidUpdateWidgetNotification"; +NSString *const kWidgetManagerDidUpdateWidgetNotification = @"kWidgetManagerDidUpdateWidgetNotification"; NSString *const WidgetManagerErrorDomain = @"WidgetManagerErrorDomain"; @@ -283,7 +283,7 @@ NSString *const WidgetManagerErrorDomain = @"WidgetManagerErrorDomain"; } // Broadcast the generic notification - [[NSNotificationCenter defaultCenter] postNotificationName:kMXKWidgetManagerDidUpdateWidgetNotification object:widget]; + [[NSNotificationCenter defaultCenter] postNotificationName:kWidgetManagerDidUpdateWidgetNotification object:widget]; } else { diff --git a/Riot/ViewController/RoomViewController.m b/Riot/ViewController/RoomViewController.m index 683dd1f11..700b6f089 100644 --- a/Riot/ViewController/RoomViewController.m +++ b/Riot/ViewController/RoomViewController.m @@ -3384,7 +3384,7 @@ - (void)listenWidgetNotifications { - kMXKWidgetManagerDidUpdateWidgetObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kMXKWidgetManagerDidUpdateWidgetNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notif) { + kMXKWidgetManagerDidUpdateWidgetObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kWidgetManagerDidUpdateWidgetNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notif) { Widget *widget = notif.object; if (widget.mxSession == self.roomDataSource.mxSession @@ -3513,7 +3513,7 @@ typeof(self) self = weakSelf; [self stopActivityIndicator]; - // The banner will automatically leave thanks to kMXKWidgetManagerDidUpdateWidgetNotification + // The banner will automatically leave thanks to kWidgetManagerDidUpdateWidgetNotification } } failure:^(NSError *error) {