From 69fa598d99df1d02b38286e5755eecb4a9f2c344 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Wed, 15 Jul 2020 20:09:11 -0500 Subject: [PATCH] Enable refresh button on macOS --- Multiplatform/Shared/SceneNavigationView.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Multiplatform/Shared/SceneNavigationView.swift b/Multiplatform/Shared/SceneNavigationView.swift index 49e284bd2..6cb0d901d 100644 --- a/Multiplatform/Shared/SceneNavigationView.swift +++ b/Multiplatform/Shared/SceneNavigationView.swift @@ -7,6 +7,7 @@ // import SwiftUI +import Account struct SceneNavigationView: View { @@ -92,6 +93,7 @@ struct SceneNavigationView: View { } ToolbarItem { Button { + AccountManager.shared.refreshAll(errorHandler: handleRefreshError) } label: { AppAssets.refreshImage } @@ -180,6 +182,11 @@ struct SceneNavigationView: View { #endif } } + + func handleRefreshError(_ error: Error) { + sceneModel.accountErrorMessage = error.localizedDescription + } + } struct NavigationView_Previews: PreviewProvider {