Fix generation of query operation

This commit is contained in:
CypherPoet 2019-02-25 00:48:28 -05:00
parent b1dffe0479
commit e24686d968
1 changed files with 2 additions and 7 deletions

View File

@ -24,10 +24,9 @@ class HomeViewController: UITableViewController {
]
let queryResultsLimit = 50
lazy var queryOperation = makeSoundBitesQueryOperation()
lazy var publicCloudDB = CKContainer.default().publicCloudDatabase
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
@ -39,11 +38,6 @@ class HomeViewController: UITableViewController {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// // clear the table view's selection if it has one
// if let selectedIndexPath = tableView.indexPathForSelectedRow {
// tableView.deselectRow(at: selectedIndexPath, animated: true)
// }
if HomeViewController.hasNewSoundBiteData {
loadSoundBites()
}
@ -81,6 +75,7 @@ class HomeViewController: UITableViewController {
// MARK: - Helper functions
func loadSoundBites() {
let queryOperation = makeSoundBitesQueryOperation()
var newRecords: [SoundBite] = []
queryOperation.recordFetchedBlock = { record in