Compare commits
No commits in common. "4ac329218364d75416c0a4b650f42d9d3e5f81f5" and "30297c2390e3d0b9a80b667e73506330341f4651" have entirely different histories.
4ac3292183
...
30297c2390
|
@ -43,9 +43,6 @@ class AuxiliarySceneDelegate: UIResponder, UIWindowSceneDelegate {
|
||||||
let controller = MastodonController.getForAccount(account)
|
let controller = MastodonController.getForAccount(account)
|
||||||
session.mastodonController = controller
|
session.mastodonController = controller
|
||||||
|
|
||||||
controller.getOwnAccount()
|
|
||||||
controller.getOwnInstance()
|
|
||||||
|
|
||||||
guard let rootVC = viewController(for: activity, mastodonController: controller) else {
|
guard let rootVC = viewController(for: activity, mastodonController: controller) else {
|
||||||
UIApplication.shared.requestSceneSessionDestruction(session, options: nil, errorHandler: nil)
|
UIApplication.shared.requestSceneSessionDestruction(session, options: nil, errorHandler: nil)
|
||||||
return
|
return
|
||||||
|
|
|
@ -32,9 +32,6 @@ class ComposeSceneDelegate: UIResponder, UIWindowSceneDelegate {
|
||||||
let controller = MastodonController.getForAccount(account)
|
let controller = MastodonController.getForAccount(account)
|
||||||
session.mastodonController = controller
|
session.mastodonController = controller
|
||||||
|
|
||||||
controller.getOwnAccount()
|
|
||||||
controller.getOwnInstance()
|
|
||||||
|
|
||||||
let composeVC = ComposeHostingController(draft: draft, mastodonController: controller)
|
let composeVC = ComposeHostingController(draft: draft, mastodonController: controller)
|
||||||
composeVC.delegate = self
|
composeVC.delegate = self
|
||||||
let nav = EnhancedNavigationViewController(rootViewController: composeVC)
|
let nav = EnhancedNavigationViewController(rootViewController: composeVC)
|
||||||
|
|
|
@ -36,7 +36,6 @@ struct ComposeAttachmentsList: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.listRowInsets(EdgeInsets(top: cellPadding / 2, leading: cellPadding / 2, bottom: cellPadding / 2, trailing: cellPadding / 2))
|
.listRowInsets(EdgeInsets(top: cellPadding / 2, leading: cellPadding / 2, bottom: cellPadding / 2, trailing: cellPadding / 2))
|
||||||
.onDrag { NSItemProvider(object: attachment) }
|
|
||||||
}
|
}
|
||||||
.onMove(perform: self.moveAttachments)
|
.onMove(perform: self.moveAttachments)
|
||||||
.onDelete(perform: self.deleteAttachments)
|
.onDelete(perform: self.deleteAttachments)
|
||||||
|
|
|
@ -81,7 +81,6 @@ class MainSidebarViewController: UIViewController {
|
||||||
collectionView.backgroundColor = .clear
|
collectionView.backgroundColor = .clear
|
||||||
collectionView.delegate = self
|
collectionView.delegate = self
|
||||||
collectionView.dragDelegate = self
|
collectionView.dragDelegate = self
|
||||||
collectionView.isSpringLoaded = true
|
|
||||||
view.addSubview(collectionView)
|
view.addSubview(collectionView)
|
||||||
|
|
||||||
dataSource = createDataSource()
|
dataSource = createDataSource()
|
||||||
|
|
|
@ -139,10 +139,8 @@ extension MainSplitViewController: UISplitViewControllerDelegate {
|
||||||
// Transfer the nav stacks for all the sidebar items that map 1 <-> 1 with tabs
|
// Transfer the nav stacks for all the sidebar items that map 1 <-> 1 with tabs
|
||||||
for tab in [MainTabBarViewController.Tab.timelines, .notifications, .myProfile] {
|
for tab in [MainTabBarViewController.Tab.timelines, .notifications, .myProfile] {
|
||||||
let tabNav = tabBarViewController.viewController(for: tab) as! UINavigationController
|
let tabNav = tabBarViewController.viewController(for: tab) as! UINavigationController
|
||||||
if tabNav.isViewLoaded {
|
|
||||||
transferNavigationStack(from: .tab(tab), to: tabNav)
|
transferNavigationStack(from: .tab(tab), to: tabNav)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Since several sidebar items map to the single Explore tab, we only transfer the
|
// Since several sidebar items map to the single Explore tab, we only transfer the
|
||||||
// navigation stack of the most-recently used one.
|
// navigation stack of the most-recently used one.
|
||||||
|
@ -237,8 +235,7 @@ extension MainSplitViewController: UISplitViewControllerDelegate {
|
||||||
// For each sidebar item, transfer the existing navigation stasck from the tab bar controller to ourself.
|
// For each sidebar item, transfer the existing navigation stasck from the tab bar controller to ourself.
|
||||||
var exploreItem: MainSidebarViewController.Item?
|
var exploreItem: MainSidebarViewController.Item?
|
||||||
for tab in MainTabBarViewController.Tab.allCases {
|
for tab in MainTabBarViewController.Tab.allCases {
|
||||||
guard let tabNavController = tabBarViewController.viewController(for: tab) as? UINavigationController,
|
guard let tabNavController = tabBarViewController.viewController(for: tab) as? UINavigationController else { continue }
|
||||||
tabNavController.isViewLoaded else { continue }
|
|
||||||
let tabNavigationStack = tabNavController.viewControllers
|
let tabNavigationStack = tabNavController.viewControllers
|
||||||
|
|
||||||
switch tab {
|
switch tab {
|
||||||
|
|
|
@ -70,8 +70,6 @@ class MainTabBarViewController: UITabBarController, UITabBarControllerDelegate {
|
||||||
let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(tabBarTapped))
|
let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(tabBarTapped))
|
||||||
tapRecognizer.cancelsTouchesInView = false
|
tapRecognizer.cancelsTouchesInView = false
|
||||||
tabBar.addGestureRecognizer(tapRecognizer)
|
tabBar.addGestureRecognizer(tapRecognizer)
|
||||||
|
|
||||||
tabBar.isSpringLoaded = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc private func tabBarTapped(_ recognizer: UITapGestureRecognizer) {
|
@objc private func tabBarTapped(_ recognizer: UITapGestureRecognizer) {
|
||||||
|
|
|
@ -78,6 +78,8 @@ class ProfileViewController: UIPageViewController {
|
||||||
}
|
}
|
||||||
navigationItem.rightBarButtonItem = composeButton
|
navigationItem.rightBarButtonItem = composeButton
|
||||||
|
|
||||||
|
userActivity = UserActivityManager.showProfileActivity(id: accountID!, accountID: mastodonController.accountInfo!.id)
|
||||||
|
|
||||||
headerView = ProfileHeaderView.create()
|
headerView = ProfileHeaderView.create()
|
||||||
headerView.delegate = self
|
headerView.delegate = self
|
||||||
|
|
||||||
|
@ -130,10 +132,6 @@ class ProfileViewController: UIPageViewController {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if let currentAccountID = mastodonController.accountInfo?.id {
|
|
||||||
userActivity = UserActivityManager.showProfileActivity(id: accountID, accountID: currentAccountID)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Optionally invoke updateUI on headerView because viewDidLoad may not have been called yet
|
// Optionally invoke updateUI on headerView because viewDidLoad may not have been called yet
|
||||||
headerView?.updateUI(for: accountID)
|
headerView?.updateUI(for: accountID)
|
||||||
navigationItem.title = account.displayNameWithoutCustomEmoji
|
navigationItem.title = account.displayNameWithoutCustomEmoji
|
||||||
|
|
Loading…
Reference in New Issue