forked from shadowfacts/Tusker
Fix crash if TimelineGapCollectionViewCell is somehow accessibility-activated
This commit is contained in:
parent
126e8c8858
commit
f004c82302
|
@ -135,11 +135,12 @@ class TimelineGapCollectionViewCell: UICollectionViewCell {
|
||||||
override var accessibilityCustomActions: [UIAccessibilityCustomAction]? {
|
override var accessibilityCustomActions: [UIAccessibilityCustomAction]? {
|
||||||
get {
|
get {
|
||||||
[TimelineGapDirection.below, .above].map { dir in
|
[TimelineGapDirection.below, .above].map { dir in
|
||||||
UIAccessibilityCustomAction(name: "Load \(dir.accessibilityLabel)") { [unowned self] _ in
|
UIAccessibilityCustomAction(name: "Load \(dir.accessibilityLabel)") { [weak self] _ in
|
||||||
|
guard let self else { return false }
|
||||||
Task {
|
Task {
|
||||||
showsIndicator = true
|
self.showsIndicator = true
|
||||||
await fillGap?(dir)
|
await self.fillGap?(dir)
|
||||||
showsIndicator = false
|
self.showsIndicator = false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue