forked from shadowfacts/Tusker
Fix crash showing custom instance on iOS 14
This commit is contained in:
parent
a5a2cd147e
commit
cf5b97d9c8
|
@ -118,7 +118,9 @@ class InstanceSelectorTableViewController: UITableViewController {
|
||||||
let request = Client.getInstance()
|
let request = Client.getInstance()
|
||||||
client.run(request) { (response) in
|
client.run(request) { (response) in
|
||||||
var snapshot = self.dataSource.snapshot()
|
var snapshot = self.dataSource.snapshot()
|
||||||
|
if snapshot.indexOfSection(.selected) != nil {
|
||||||
snapshot.deleteItems(snapshot.itemIdentifiers(inSection: .selected))
|
snapshot.deleteItems(snapshot.itemIdentifiers(inSection: .selected))
|
||||||
|
}
|
||||||
|
|
||||||
if case let .success(instance, _) = response {
|
if case let .success(instance, _) = response {
|
||||||
if !snapshot.sectionIdentifiers.contains(.selected) {
|
if !snapshot.sectionIdentifiers.contains(.selected) {
|
||||||
|
|
Loading…
Reference in New Issue