This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MARK: - Helper Functions | |
extension NotificationService { | |
/// Use this function to download an image and present it in a notification | |
/// | |
/// - Parameters: | |
/// - url: the url of the picture | |
/// - completion: return the image in the form of UNNotificationAttachment to be added to the bestAttemptContent attachments eventually | |
private func downloadImageFrom(url: URL, with completionHandler: @escaping (UNNotificationAttachment?) -> Void) { | |
let task = URLSession.shared.downloadTask(with: url) { (downloadedUrl, response, error) in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:document.write('<pre>'+JSON.stringify(JSON.parse(document.body.textContent),null,'\t')+'</pre>') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class QuickReturn { | |
private final static int ANIMATION_DURATION_MILLIS = 250; | |
private final ListView listView; | |
private final View quickReturnView; | |
private final View headerPlaceholder; | |
private int itemCount; | |
private int itemOffsetY[]; |