NewsBlur/clients/ios/Classes/StoryPagesViewController.swift
David Sinclair 1aafa10d61 #1247 (Mac Catalyst edition)
- Fixed Toggle Sidebar button / menu command not working in some situations.
- Fixed drawing of segmented controls.
- Checked iPhone and iPad apps; fixed some regressions.
2024-02-09 21:02:08 -05:00

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
}