From f1b8b794d32d3426923403e3c46e6c8c0355b1e8 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Mon, 25 Jan 2021 16:38:01 -0500 Subject: [PATCH] [+] Add refresh family button --- ProjectClock/AccountViewController.swift | 12 ++++++++++++ ProjectClock/Base.lproj/Main.storyboard | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ProjectClock/AccountViewController.swift b/ProjectClock/AccountViewController.swift index 854864d..d39ece2 100644 --- a/ProjectClock/AccountViewController.swift +++ b/ProjectClock/AccountViewController.swift @@ -255,6 +255,18 @@ class FamilyVC: UIViewController } } + /** + Called when the user clicks the refresh button + */ + @IBAction func btnRefresh(_ sender: Any) + { + sendReq(APIs.familyGet, title: "Updating family...") + { + $0.localSave() + self.table.reloadData() + } + } + /** Called when the user clicks the change pin button */ diff --git a/ProjectClock/Base.lproj/Main.storyboard b/ProjectClock/Base.lproj/Main.storyboard index 44528c0..01b2e90 100644 --- a/ProjectClock/Base.lproj/Main.storyboard +++ b/ProjectClock/Base.lproj/Main.storyboard @@ -1111,7 +1111,7 @@ - +