Compare commits

..

No commits in common. "37311e5f17ba136bb56425ffed30ad8ccab62bc9" and "0de9a9fd371169433e980e0d09f00008429e1130" have entirely different histories.

5 changed files with 5 additions and 28 deletions

View File

@ -25,14 +25,7 @@ class LargeImageInteractionController: UIPercentDrivenInteractiveTransition {
} }
@objc func handleGesture(_ recognizer: UIPanGestureRecognizer) { @objc func handleGesture(_ recognizer: UIPanGestureRecognizer) {
guard let recognizerSuperview = recognizer.view?.superview else { let translation = recognizer.translation(in: recognizer.view!.superview!)
// Assume the gesture has ended b/c we don't have a view/superview anymore.
inProgress = false
direction = nil
cancel()
return
}
let translation = recognizer.translation(in: recognizerSuperview)
var progress = translation.y / 200 var progress = translation.y / 200
if let direction = direction { if let direction = direction {
progress *= direction progress *= direction
@ -70,7 +63,7 @@ class LargeImageInteractionController: UIPercentDrivenInteractiveTransition {
override func cancel() { override func cancel() {
super.cancel() super.cancel()
viewController?.isInteractivelyAnimatingDismissal = false viewController.isInteractivelyAnimatingDismissal = false
} }
} }

View File

@ -214,10 +214,6 @@ extension MainSplitViewController: UISplitViewControllerDelegate {
if item == sidebar.selectedItem { if item == sidebar.selectedItem {
itemNavStack = secondaryNavController.viewControllers itemNavStack = secondaryNavController.viewControllers
secondaryNavController.viewControllers = [] secondaryNavController.viewControllers = []
// Sometimes removing a VC from the viewControllers array doesn't immediately remove it's view from the hierarchy
for vc in itemNavStack {
vc.viewIfLoaded?.removeFromSuperview()
}
} else { } else {
itemNavStack = navigationStacks[item] ?? [] itemNavStack = navigationStacks[item] ?? []
navigationStacks.removeValue(forKey: item) navigationStacks.removeValue(forKey: item)
@ -343,11 +339,6 @@ extension MainSplitViewController: UISplitViewControllerDelegate {
let viewControllersToMove = navController.viewControllers.dropFirst(skipFirst) let viewControllersToMove = navController.viewControllers.dropFirst(skipFirst)
navController.viewControllers.removeLast(navController.viewControllers.count - skipFirst) navController.viewControllers.removeLast(navController.viewControllers.count - skipFirst)
// Sometimes removing a VC from the viewControllers array doesn't immediately remove it's view from the hierarchy
for vc in viewControllersToMove {
vc.viewIfLoaded?.removeFromSuperview()
}
if let prepend = prepend { if let prepend = prepend {
navigationStacks[item] = [prepend] + viewControllersToMove navigationStacks[item] = [prepend] + viewControllersToMove
} else { } else {

View File

@ -150,8 +150,7 @@ class InstanceSelectorTableViewController: UITableViewController {
private func updateSpecificInstance(domain: String) { private func updateSpecificInstance(domain: String) {
activityIndicator.startAnimating() activityIndicator.startAnimating()
guard let components = parseURLComponents(input: domain), guard let components = parseURLComponents(input: domain) else {
let url = components.url else {
var snapshot = dataSource.snapshot() var snapshot = dataSource.snapshot()
if snapshot.indexOfSection(.selected) != nil { if snapshot.indexOfSection(.selected) != nil {
snapshot.deleteSections([.selected]) snapshot.deleteSections([.selected])
@ -160,6 +159,7 @@ class InstanceSelectorTableViewController: UITableViewController {
activityIndicator.stopAnimating() activityIndicator.stopAnimating()
return return
} }
let url = components.url!
let client = Client(baseURL: url, session: .appDefault) let client = Client(baseURL: url, session: .appDefault)
let request = Client.getInstance() let request = Client.getInstance()

View File

@ -1166,10 +1166,7 @@ extension TimelineViewController {
let addedItems: Bool let addedItems: Bool
let statusItems = snapshot.itemIdentifiers(inSection: .statuses) let statusItems = snapshot.itemIdentifiers(inSection: .statuses)
guard let gapIndex = statusItems.firstIndex(of: .gap) else { let gapIndex = statusItems.firstIndex(of: .gap)!
// Not sure how this is reachable (maybe the gap cell was tapped twice and the requests raced?) but w/e
return
}
switch direction { switch direction {
case .above: case .above:
@ -1296,9 +1293,6 @@ extension TimelineViewController: UICollectionViewDelegate {
selected(status: status.reblog?.id ?? id, state: collapseState.copy()) selected(status: status.reblog?.id ?? id, state: collapseState.copy())
} }
case .gap: case .gap:
guard controller.state == .idle else {
return
}
let cell = collectionView.cellForItem(at: indexPath) as! TimelineGapCollectionViewCell let cell = collectionView.cellForItem(at: indexPath) as! TimelineGapCollectionViewCell
cell.showsIndicator = true cell.showsIndicator = true
Task { Task {

View File

@ -38,7 +38,6 @@ struct AccountDisplayNameView: View {
let matches = emojiRegex.matches(in: account.displayName, options: [], range: fullRange) let matches = emojiRegex.matches(in: account.displayName, options: [], range: fullRange)
guard !matches.isEmpty else { return } guard !matches.isEmpty else { return }
let emojiSize = self.emojiSize
let emojiImages = MultiThreadDictionary<String, Image>() let emojiImages = MultiThreadDictionary<String, Image>()
let group = DispatchGroup() let group = DispatchGroup()