mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 04:32:32 +00:00
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
35 lines
1.2 KiB
Objective-C
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
|