Merge pull request #3341 from vector-im/disable_highlights_from_push

Disable Highlights from Push
This commit is contained in:
ismailgulek 2020-06-15 15:46:04 +03:00 committed by GitHub
commit 06509537dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 12 deletions

View file

@ -27,7 +27,6 @@ Bug fix:
* Xcode11: Respect system dark mode setting (#2628).
* Xcode11: Fix noisy notifications (#3316).
* Xcode11: Temporary workaround for navigation bar bg color on emoji selection screen (#3271).
* Xcode11: Pass eventId when navigating to room from notification (#3321).
* Project: Remove GoogleService-Info.plist (#3329).
Changes in 0.11.6 (2020-xx-xx)

View file

@ -1170,9 +1170,9 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
#pragma mark - PushNotificationServiceDelegate
- (void)pushNotificationService:(PushNotificationService *)pushNotificationService shouldNavigateToRoomWithId:(NSString *)roomId eventId:(nonnull NSString *)eventId
- (void)pushNotificationService:(PushNotificationService *)pushNotificationService shouldNavigateToRoomWithId:(NSString *)roomId
{
[self navigateToRoomById:roomId eventId:eventId];
[self navigateToRoomById:roomId];
}
#pragma mark - Badge Count
@ -2839,7 +2839,7 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
#pragma mark - Matrix Rooms handling
- (void)navigateToRoomById:(NSString *)roomId eventId:(NSString *)eventId
- (void)navigateToRoomById:(NSString *)roomId
{
if (roomId.length)
{
@ -2873,7 +2873,7 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
{
NSLog(@"[AppDelegate][Push] navigateToRoomById: open the roomViewController %@", roomId);
[self showRoom:roomId andEventId:eventId withMatrixSession:dedicatedAccount.mxSession];
[self showRoom:roomId andEventId:nil withMatrixSession:dedicatedAccount.mxSession];
}
else
{

View file

@ -91,8 +91,7 @@ NS_ASSUME_NONNULL_BEGIN
@param eventId Event identifier to be navigated around.
*/
- (void)pushNotificationService:(PushNotificationService *)pushNotificationService
shouldNavigateToRoomWithId:(NSString *)roomId
eventId:(NSString *)eventId;
shouldNavigateToRoomWithId:(NSString *)roomId;
@end;

View file

@ -140,7 +140,6 @@
UNNotificationContent *content = notification.request.content;
NSString *actionIdentifier = [response actionIdentifier];
NSString *roomId = content.userInfo[@"room_id"];
NSString *eventId = content.userInfo[@"event_id"];
if ([actionIdentifier isEqualToString:@"inline-reply"])
{
@ -177,7 +176,7 @@
}
else if ([actionIdentifier isEqualToString:UNNotificationDefaultActionIdentifier])
{
[self notifyNavigateToRoomById:roomId eventId:eventId];
[self notifyNavigateToRoomById:roomId];
completionHandler();
}
else
@ -318,11 +317,11 @@
#pragma mark - Delegate Notifiers
- (void)notifyNavigateToRoomById:(NSString *)roomId eventId:(NSString *)eventId
- (void)notifyNavigateToRoomById:(NSString *)roomId
{
if ([_delegate respondsToSelector:@selector(pushNotificationService:shouldNavigateToRoomWithId:eventId:)])
if ([_delegate respondsToSelector:@selector(pushNotificationService:shouldNavigateToRoomWithId:)])
{
[_delegate pushNotificationService:self shouldNavigateToRoomWithId:roomId eventId:eventId];
[_delegate pushNotificationService:self shouldNavigateToRoomWithId:roomId];
}
}