Compare commits

..

No commits in common. "4ac329218364d75416c0a4b650f42d9d3e5f81f5" and "30297c2390e3d0b9a80b667e73506330341f4651" have entirely different histories.

7 changed files with 4 additions and 19 deletions

View File

@ -43,9 +43,6 @@ class AuxiliarySceneDelegate: UIResponder, UIWindowSceneDelegate {
let controller = MastodonController.getForAccount(account)
session.mastodonController = controller
controller.getOwnAccount()
controller.getOwnInstance()
guard let rootVC = viewController(for: activity, mastodonController: controller) else {
UIApplication.shared.requestSceneSessionDestruction(session, options: nil, errorHandler: nil)
return

View File

@ -32,9 +32,6 @@ class ComposeSceneDelegate: UIResponder, UIWindowSceneDelegate {
let controller = MastodonController.getForAccount(account)
session.mastodonController = controller
controller.getOwnAccount()
controller.getOwnInstance()
let composeVC = ComposeHostingController(draft: draft, mastodonController: controller)
composeVC.delegate = self
let nav = EnhancedNavigationViewController(rootViewController: composeVC)

View File

@ -36,7 +36,6 @@ struct ComposeAttachmentsList: View {
}
}
.listRowInsets(EdgeInsets(top: cellPadding / 2, leading: cellPadding / 2, bottom: cellPadding / 2, trailing: cellPadding / 2))
.onDrag { NSItemProvider(object: attachment) }
}
.onMove(perform: self.moveAttachments)
.onDelete(perform: self.deleteAttachments)

View File

@ -81,7 +81,6 @@ class MainSidebarViewController: UIViewController {
collectionView.backgroundColor = .clear
collectionView.delegate = self
collectionView.dragDelegate = self
collectionView.isSpringLoaded = true
view.addSubview(collectionView)
dataSource = createDataSource()

View File

@ -139,9 +139,7 @@ extension MainSplitViewController: UISplitViewControllerDelegate {
// Transfer the nav stacks for all the sidebar items that map 1 <-> 1 with tabs
for tab in [MainTabBarViewController.Tab.timelines, .notifications, .myProfile] {
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
@ -237,8 +235,7 @@ extension MainSplitViewController: UISplitViewControllerDelegate {
// For each sidebar item, transfer the existing navigation stasck from the tab bar controller to ourself.
var exploreItem: MainSidebarViewController.Item?
for tab in MainTabBarViewController.Tab.allCases {
guard let tabNavController = tabBarViewController.viewController(for: tab) as? UINavigationController,
tabNavController.isViewLoaded else { continue }
guard let tabNavController = tabBarViewController.viewController(for: tab) as? UINavigationController else { continue }
let tabNavigationStack = tabNavController.viewControllers
switch tab {

View File

@ -70,8 +70,6 @@ class MainTabBarViewController: UITabBarController, UITabBarControllerDelegate {
let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(tabBarTapped))
tapRecognizer.cancelsTouchesInView = false
tabBar.addGestureRecognizer(tapRecognizer)
tabBar.isSpringLoaded = true
}
@objc private func tabBarTapped(_ recognizer: UITapGestureRecognizer) {

View File

@ -78,6 +78,8 @@ class ProfileViewController: UIPageViewController {
}
navigationItem.rightBarButtonItem = composeButton
userActivity = UserActivityManager.showProfileActivity(id: accountID!, accountID: mastodonController.accountInfo!.id)
headerView = ProfileHeaderView.create()
headerView.delegate = self
@ -130,10 +132,6 @@ class ProfileViewController: UIPageViewController {
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
headerView?.updateUI(for: accountID)
navigationItem.title = account.displayNameWithoutCustomEmoji