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) {
guard let recognizerSuperview = recognizer.view?.superview else {
// 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)
let translation = recognizer.translation(in: recognizer.view!.superview!)
var progress = translation.y / 200
if let direction = direction {
progress *= direction
@ -70,7 +63,7 @@ class LargeImageInteractionController: UIPercentDrivenInteractiveTransition {
override func cancel() {
super.cancel()
viewController?.isInteractivelyAnimatingDismissal = false
viewController.isInteractivelyAnimatingDismissal = false
}
}

View File

@ -214,10 +214,6 @@ extension MainSplitViewController: UISplitViewControllerDelegate {
if item == sidebar.selectedItem {
itemNavStack = 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 {
itemNavStack = navigationStacks[item] ?? []
navigationStacks.removeValue(forKey: item)
@ -343,11 +339,6 @@ extension MainSplitViewController: UISplitViewControllerDelegate {
let viewControllersToMove = navController.viewControllers.dropFirst(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 {
navigationStacks[item] = [prepend] + viewControllersToMove
} else {

View File

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

View File

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

View File

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