Enable refresh button on macOS
This commit is contained in:
parent
e34dbd48ee
commit
69fa598d99
|
@ -7,6 +7,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import Account
|
||||||
|
|
||||||
struct SceneNavigationView: View {
|
struct SceneNavigationView: View {
|
||||||
|
|
||||||
|
@ -92,6 +93,7 @@ struct SceneNavigationView: View {
|
||||||
}
|
}
|
||||||
ToolbarItem {
|
ToolbarItem {
|
||||||
Button {
|
Button {
|
||||||
|
AccountManager.shared.refreshAll(errorHandler: handleRefreshError)
|
||||||
} label: {
|
} label: {
|
||||||
AppAssets.refreshImage
|
AppAssets.refreshImage
|
||||||
}
|
}
|
||||||
|
@ -180,6 +182,11 @@ struct SceneNavigationView: View {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func handleRefreshError(_ error: Error) {
|
||||||
|
sceneModel.accountErrorMessage = error.localizedDescription
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct NavigationView_Previews: PreviewProvider {
|
struct NavigationView_Previews: PreviewProvider {
|
||||||
|
|
Loading…
Reference in New Issue