mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00

- Fixed Toggle Sidebar button / menu command not working in some situations. - Fixed drawing of segmented controls. - Checked iPhone and iPad apps; fixed some regressions.
35 lines
998 B
Swift
35 lines
998 B
Swift
//
|
|
// StoryPagesViewController.swift
|
|
// NewsBlur
|
|
//
|
|
// Created by David Sinclair on 2020-08-27.
|
|
// Copyright © 2020 NewsBlur. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
import WidgetKit
|
|
|
|
/// Manages story pages, containing the previous, current, and next stories.
|
|
class StoryPagesViewController: StoryPagesObjCViewController {
|
|
/// Convenience initializer to load a new instance of this class from the XIB.
|
|
convenience init() {
|
|
self.init(nibName: "StoryPagesViewController", bundle: nil)
|
|
|
|
self.appDelegate = NewsBlurAppDelegate.shared()
|
|
}
|
|
|
|
/// Reload the widget timeline.
|
|
@objc func reloadWidget() {
|
|
WidgetCenter.shared.reloadAllTimelines()
|
|
}
|
|
|
|
#if targetEnvironment(macCatalyst)
|
|
@objc func validateToolbarItem(_ item: NSToolbarItem) -> Bool {
|
|
if [.storyPagesSettings, .storyPagesBrowser].contains(item.itemIdentifier) {
|
|
return self.isStoryShown
|
|
} else {
|
|
return true
|
|
}
|
|
}
|
|
#endif
|
|
}
|