mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00

- Fixing several issues, including crash on launch due to loading the feed detail multiple times.
29 lines
735 B
Swift
29 lines
735 B
Swift
//
|
|
// FeedsViewController.swift
|
|
// NewsBlur
|
|
//
|
|
// Created by David Sinclair on 2020-08-27.
|
|
// Copyright © 2020 NewsBlur. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
///Sidebar listing all of the feeds.
|
|
class FeedsViewController: FeedsObjCViewController {
|
|
var loadWorkItem: DispatchWorkItem?
|
|
|
|
@objc func loadNotificationStory() {
|
|
loadWorkItem?.cancel()
|
|
|
|
let workItem = DispatchWorkItem { [weak self] in
|
|
guard let self = self else {
|
|
return
|
|
}
|
|
|
|
self.backgroundLoadNotificationStory()
|
|
}
|
|
|
|
loadWorkItem = workItem
|
|
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(250), execute: workItem)
|
|
}
|
|
}
|