Skip to content

Commit fc96426

Browse files
committed
chore: remove refresh actions (it doesn't work properly)
Signed-off-by: Tommy van der Vorst <tommy@pixelspark.nl>
1 parent 673fcaa commit fc96426

File tree

2 files changed

+6
-19
lines changed

2 files changed

+6
-19
lines changed

Sushitrain/App.swift

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ struct SushitrainApp: App {
3232
@AppStorage("hideInDock") var hideInDock: Bool = false
3333
#endif
3434

35-
@Environment(\.refresh) private var refreshAction: RefreshAction?
36-
3735
init() {
3836
// Install uncaught exception handler
3937
NSSetUncaughtExceptionHandler { e in
@@ -263,14 +261,6 @@ struct SushitrainApp: App {
263261

264262
Toggle("Hide hidden folders", isOn: appState.userSettings.$hideHiddenFolders)
265263
.keyboardShortcut("P", modifiers: [.command, .shift])
266-
267-
Button("Refresh", systemImage: "arrow.clockwise") {
268-
Task {
269-
await refreshAction?()
270-
}
271-
}
272-
.disabled(refreshAction == nil)
273-
.keyboardShortcut("R", modifiers: .command)
274264
}
275265

276266
#if os(macOS)

Sushitrain/BrowserView.swift

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ struct BrowserView: View {
102102

103103
@Environment(AppState.self) private var appState
104104
@Environment(\.showToast) private var showToast
105-
@Environment(\.refresh) private var refreshAction: RefreshAction?
106105

107106
var folder: SushitrainFolder
108107
var prefix: String
@@ -576,13 +575,6 @@ struct BrowserView: View {
576575
#endif
577576
.keyboardShortcut("R", modifiers: [.command, .shift])
578577

579-
Button("Refresh", systemImage: "arrow.clockwise") {
580-
Task {
581-
Log.info("Refresh from menu")
582-
await self.refreshAction?()
583-
}
584-
}.keyboardShortcut("R", modifiers: .command)
585-
586578
Divider()
587579

588580
if folder.isSelective() {
@@ -1256,6 +1248,7 @@ private struct BrowserItemsView: View {
12561248
}
12571249

12581250
private func reload() async {
1251+
Log.info("Reload \(self.prefix)")
12591252
self.isLoading = true
12601253
self.showSpinner = false
12611254
let loadingSpinnerTask = Task {
@@ -1430,7 +1423,11 @@ struct ItemSelectToggleView: View {
14301423
appState.alert(message: em)
14311424
}
14321425
else if s && self.file.isDirectory() {
1433-
appState.alert(message: String(localized: "You have selected a subdirectory for synchronisation. All files contained in this subdirectory will be synchronized, including new files. If you delete files from this subdirectory, the deletion will propagate to other devices."))
1426+
appState.alert(
1427+
message: String(
1428+
localized:
1429+
"You have selected a subdirectory for synchronisation. All files contained in this subdirectory will be synchronized, including new files. If you delete files from this subdirectory, the deletion will propagate to other devices."
1430+
))
14341431
}
14351432
}
14361433
})

0 commit comments

Comments
 (0)