mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-09-24 04:03:03 -04:00
Remove force unwrap in FetchedResultsControllerDelegate
This commit is contained in:
parent
7b762bb9ab
commit
cd6089de3b
@ -277,7 +277,8 @@ class LibraryDownloadTBVC: UITableViewController, NSFetchedResultsControllerDele
|
||||
case .Delete:
|
||||
tableView.deleteRowsAtIndexPaths([indexPath!], withRowAnimation: .Fade)
|
||||
case .Update:
|
||||
self.configureCell(tableView.cellForRowAtIndexPath(indexPath!)!, atIndexPath: indexPath!)
|
||||
guard let indexPath = indexPath, let cell = tableView.cellForRowAtIndexPath(indexPath) else {return}
|
||||
configureCell(cell, atIndexPath: indexPath)
|
||||
case .Move:
|
||||
tableView.deleteRowsAtIndexPaths([indexPath!], withRowAnimation: .Fade)
|
||||
tableView.insertRowsAtIndexPaths([newIndexPath!], withRowAnimation: .Fade)
|
||||
|
@ -242,7 +242,8 @@ class LibraryLocalTBVC: UITableViewController, NSFetchedResultsControllerDelegat
|
||||
case .Delete:
|
||||
tableView.deleteRowsAtIndexPaths([indexPath!], withRowAnimation: .Fade)
|
||||
case .Update:
|
||||
self.configureCell(tableView.cellForRowAtIndexPath(indexPath!)!, atIndexPath: indexPath!)
|
||||
guard let indexPath = indexPath, let cell = tableView.cellForRowAtIndexPath(indexPath) else {return}
|
||||
configureCell(cell, atIndexPath: indexPath)
|
||||
case .Move:
|
||||
tableView.deleteRowsAtIndexPaths([indexPath!], withRowAnimation: .Fade)
|
||||
tableView.insertRowsAtIndexPaths([newIndexPath!], withRowAnimation: .Fade)
|
||||
|
Loading…
x
Reference in New Issue
Block a user