Correct behavior when remove bookmark by swiping left

This commit is contained in:
Chris Li 2016-07-25 14:28:02 -04:00
parent b90f63926e
commit 7a7b636fda
2 changed files with 3 additions and 3 deletions

View File

@ -132,11 +132,11 @@ class BookmarkTBVC: UITableViewController, NSFetchedResultsControllerDelegate, D
override func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]? {
let remove = UITableViewRowAction(style: .Destructive, title: LocalizedStrings.remove) { (action, indexPath) -> Void in
guard let article = self.fetchedResultController.objectAtIndexPath(indexPath) as? Article else {return}
self.updateWidgetData()
let context = NSManagedObjectContext.mainQueueContext
context.performBlockAndWait({ () -> Void in
context.deleteObject(article)
article.isBookmarked = false
})
self.updateWidgetData()
}
return [remove]
}

View File

@ -49,7 +49,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.7.506</string>
<string>1.7.509</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>