Files
lunasea/ios/ImageNotification/NotificationService.m
Jagandeep Brar 157b44045c [Release] v5.0.0 (50000008) (#322)
NEW
- [Webhooks] Show series, movie, or artist cover photos in incoming system notifications
- [Webhooks/Radarr] Jump directly into the content by tapping the notification
- [Webhooks/Sonarr] Jump directly into the content by tapping the notification
- [-arr/Details] Added a button to the AppBar to jump directly into the edit page

TWEAKS
- [Radarr/Files] Moved the video block above the audio block

FIXES
- [AppBar/Dropdown] Vertical padding around title when the profile dropdown is visible was incorrect
- [Radarr/Details] If the movie was not found, it would show an infinite loader, now shows a "No Movies Found" message
- [Radarr/Releases] Changing the sorting or filter method would not scroll the list back to the top
2021-03-03 18:20:01 -06:00

35 lines
1.2 KiB
Objective-C

//
// NotificationService.m
// ImageNotification
//
// Created by Jagandeep Brar on 2021-02-25.
// Copyright © 2021 The Chromium Authors. All rights reserved.
//
#import "NotificationService.h"
#import "FirebaseMessaging.h"
@interface NotificationService ()
@property (nonatomic, strong) void (^contentHandler)(UNNotificationContent *contentToDeliver);
@property (nonatomic, strong) UNMutableNotificationContent *bestAttemptContent;
@end
@implementation NotificationService
- (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler {
self.contentHandler = contentHandler;
self.bestAttemptContent = [request.content mutableCopy];
[[FIRMessaging extensionHelper] populateNotificationContent:self.bestAttemptContent withContentHandler:contentHandler];
}
- (void)serviceExtensionTimeWillExpire {
// Called just before the extension will be terminated by the system.
// Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used.
self.contentHandler(self.bestAttemptContent);
}
@end