From 24deb73c38206e1a15a39186effbd60b8d85a766 Mon Sep 17 00:00:00 2001 From: Alan Maynard Date: Thu, 28 Mar 2019 12:50:40 -0400 Subject: [PATCH] =?UTF-8?q?SWF-21=20Initial=20setup=20for=20=E2=80=9Cloadi?= =?UTF-8?q?ng=E2=80=9D=20during=20account=20tap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - we may need to refine this a bit, but for now we display an alert that we are loading once the user taps their account - it will auto-dismiss and push to account details when the web service returns --- .../AccountTableInterfaceController.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift index cbb3543..499c68e 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift @@ -47,10 +47,14 @@ class AccountTableInterfaceController: WKInterfaceController { } override func table(_ table: WKInterfaceTable, didSelectRowAt rowIndex: Int) { + presentAlert(withTitle: "Loading...", message: "Loading Account Details and Recent Transactions", preferredStyle: .alert, actions: [WKAlertAction(title: "cancel", style: .cancel, handler: { + self.dismiss() + })]) acctDict.updateValue(accounts[rowIndex], forKey: "acct") FetchData.fetchTransactionsFor(accountAlias: accounts[rowIndex].accountAlias) { transactions, error in guard error == nil else { return } self.transactionDict.updateValue(transactions, forKey: "transactions") + self.dismiss() self.presentController(withNames: ["AccountDetails", "Transactions"], contexts: [self.acctDict, self.transactionDict]) } }