From 7e34c6f81e733b7737c30f766d6a30df4fddeee6 Mon Sep 17 00:00:00 2001 From: Bob Sun Date: Sat, 4 Feb 2017 15:15:57 +0800 Subject: [PATCH] fix a bug: after syncing password, the table view is frozen --- pass/PasswordsViewController.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pass/PasswordsViewController.swift b/pass/PasswordsViewController.swift index 7e06005..4efe328 100644 --- a/pass/PasswordsViewController.swift +++ b/pass/PasswordsViewController.swift @@ -41,12 +41,11 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV } }) DispatchQueue.main.async { + self.passwordEntities = PasswordStore.shared.fetchPasswordEntityCoreData() + self.reloadTableView(data: self.passwordEntities!) SVProgressHUD.showSuccess(withStatus: "Done") SVProgressHUD.dismiss(withDelay: 1) } - print("pull success") - self.passwordEntities = PasswordStore.shared.fetchPasswordEntityCoreData() - self.reloadTableView(data: self.passwordEntities!) } catch { DispatchQueue.main.async { SVProgressHUD.showError(withStatus: error.localizedDescription)