You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix:
In FolderViewControllerfolder property is a struct, so in methods deleteItem(item:) and insert(item:) changing the folder property will trigger didSet block with tableView.reloadData().
Therefore, tableView.deleteRows(at: [IndexPath(row: index, section: 0)], with: .automatic) and self.tableView.insertRows(at: [IndexPath(row: self.folder.contents.endIndex-1, section: 0)], with: .automatic) are redundand and provoke a crash.
Deleting these lines should fix it
The text was updated successfully, but these errors were encountered:
Fix:
In
FolderViewController
folder
property is a struct, so in methodsdeleteItem(item:)
andinsert(item:)
changing the folder property will triggerdidSet
block withtableView.reloadData()
.Therefore,
tableView.deleteRows(at: [IndexPath(row: index, section: 0)], with: .automatic)
andself.tableView.insertRows(at: [IndexPath(row: self.folder.contents.endIndex-1, section: 0)], with: .automatic)
are redundand and provoke a crash.Deleting these lines should fix it
The text was updated successfully, but these errors were encountered: