Skip to content

Commit

Permalink
#477 | Fixing category selection after deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Morgan committed Apr 11, 2022
1 parent c0487a6 commit 613e299
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Vocable/Features/Root/CategoriesCarouselViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ import Combine
}

let newItemIndexPath: IndexPath? = {
if let category = Category.fetchObject(in: NSPersistentContainer.shared.viewContext, matching: previous.objectID),
category.isUserRemoved {
return previous.indexPath
}

if let indexPath = self.dataSourceProxy.indexPath(for: previous.objectID) {
return indexPath
}
Expand Down

0 comments on commit 613e299

Please sign in to comment.