Compare commits
5 Commits
30297c2390
...
4ac3292183
Author | SHA1 | Date |
---|---|---|
Shadowfacts | 4ac3292183 | |
Shadowfacts | d3c13ee1e6 | |
Shadowfacts | 1b44117891 | |
Shadowfacts | c7b708e62b | |
Shadowfacts | 56b51f944d |
|
@ -43,6 +43,9 @@ 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
|
||||
|
|
|
@ -32,6 +32,9 @@ 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)
|
||||
|
|
|
@ -36,6 +36,7 @@ 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)
|
||||
|
|
|
@ -81,6 +81,7 @@ class MainSidebarViewController: UIViewController {
|
|||
collectionView.backgroundColor = .clear
|
||||
collectionView.delegate = self
|
||||
collectionView.dragDelegate = self
|
||||
collectionView.isSpringLoaded = true
|
||||
view.addSubview(collectionView)
|
||||
|
||||
dataSource = createDataSource()
|
||||
|
|
|
@ -139,8 +139,10 @@ 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)
|
||||
}
|
||||
}
|
||||
|
||||
// Since several sidebar items map to the single Explore tab, we only transfer the
|
||||
// navigation stack of the most-recently used one.
|
||||
|
@ -235,7 +237,8 @@ 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 else { continue }
|
||||
guard let tabNavController = tabBarViewController.viewController(for: tab) as? UINavigationController,
|
||||
tabNavController.isViewLoaded else { continue }
|
||||
let tabNavigationStack = tabNavController.viewControllers
|
||||
|
||||
switch tab {
|
||||
|
|
|
@ -70,6 +70,8 @@ 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) {
|
||||
|
|
|
@ -78,8 +78,6 @@ class ProfileViewController: UIPageViewController {
|
|||
}
|
||||
navigationItem.rightBarButtonItem = composeButton
|
||||
|
||||
userActivity = UserActivityManager.showProfileActivity(id: accountID!, accountID: mastodonController.accountInfo!.id)
|
||||
|
||||
headerView = ProfileHeaderView.create()
|
||||
headerView.delegate = self
|
||||
|
||||
|
@ -132,6 +130,10 @@ 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
|
||||
|
|
Loading…
Reference in New Issue