46 lines
1.4 KiB
Swift
46 lines
1.4 KiB
Swift
//
|
|
// Duckable+Root.swift
|
|
// Tusker
|
|
//
|
|
// Created by Shadowfacts on 11/7/22.
|
|
// Copyright © 2022 Shadowfacts. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
import Duckable
|
|
|
|
@available(iOS 16.0, *)
|
|
extension DuckableContainerViewController: TuskerRootViewController {
|
|
func stateRestorationActivity() -> NSUserActivity? {
|
|
(child as? TuskerRootViewController)?.stateRestorationActivity()
|
|
}
|
|
|
|
func restoreActivity(_ activity: NSUserActivity) {
|
|
(child as? TuskerRootViewController)?.restoreActivity(activity)
|
|
}
|
|
|
|
func presentCompose() {
|
|
(child as? TuskerRootViewController)?.presentCompose()
|
|
}
|
|
|
|
func select(tab: MainTabBarViewController.Tab) {
|
|
(child as? TuskerRootViewController)?.select(tab: tab)
|
|
}
|
|
|
|
func getTabController(tab: MainTabBarViewController.Tab) -> UIViewController? {
|
|
return (child as? TuskerRootViewController)?.getTabController(tab: tab)
|
|
}
|
|
|
|
func performSearch(query: String) {
|
|
(child as? TuskerRootViewController)?.performSearch(query: query)
|
|
}
|
|
|
|
func presentPreferences(completion: (() -> Void)?) {
|
|
(child as? TuskerRootViewController)?.presentPreferences(completion: completion)
|
|
}
|
|
|
|
func handleStatusBarTapped(xPosition: CGFloat) -> StatusBarTapActionResult {
|
|
(child as? TuskerRootViewController)?.handleStatusBarTapped(xPosition: xPosition) ?? .continue
|
|
}
|
|
}
|