Skip to content

Commit 405a6f9

Browse files
committed
chore: formatting
Signed-off-by: Tommy van der Vorst <tommy@pixelspark.nl>
1 parent d81185d commit 405a6f9

File tree

4 files changed

+39
-28
lines changed

4 files changed

+39
-28
lines changed

Sushitrain/AppState.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ struct SyncState {
207207
}
208208
}
209209
}
210-
210+
211211
private func resolveBookmarks() {
212212
let folderIDs = client.folders()?.asArray() ?? []
213213
for folderID in folderIDs {
@@ -218,7 +218,8 @@ struct SyncState {
218218
let resolvedPath = bm.path(percentEncoded: false)
219219
let oldPath = folder.path()
220220
if oldPath != resolvedPath {
221-
Log.info("Changing the path for folder '\(folderID)' after resolving bookmark: \(resolvedPath) (old path was \(oldPath)")
221+
Log.info(
222+
"Changing the path for folder '\(folderID)' after resolving bookmark: \(resolvedPath) (old path was \(oldPath)")
222223
try folder.setPath(resolvedPath)
223224
}
224225
}
@@ -234,7 +235,7 @@ struct SyncState {
234235
}
235236
}
236237
}
237-
238+
238239
@MainActor func start() async {
239240
if self.startupState != .notStarted || self.startupState != .onboarding {
240241
assertionFailure("cannot start again")
@@ -279,7 +280,7 @@ struct SyncState {
279280
self.resolveBookmarks()
280281

281282
await self.updateDeviceSuspension()
282-
283+
283284
let folderIDs = client.folders()?.asArray() ?? []
284285

285286
// Do we need to pause all folders?
@@ -728,7 +729,7 @@ struct SyncState {
728729
self.userSettings.hideHiddenFolders = true
729730
}
730731
#endif
731-
732+
732733
// Re-resolve bookmarks, in some cases apps may have updated and their paths changed
733734
self.resolveBookmarks()
734735

Sushitrain/PhotoBackupView.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,17 @@ struct PhotoBackupSettingsView: View {
286286
Text("Photos will be automatically removed from your photo library and iCloud after they have been backed up.")
287287
}
288288
else {
289-
Text("Photos will be automatically removed from your photo library and iCloud \(photoBackup.purgeAfterDays) days after they have been backed up.")
289+
Text(
290+
"Photos will be automatically removed from your photo library and iCloud \(photoBackup.purgeAfterDays) days after they have been backed up."
291+
)
290292
}
291293
}
292294
else {
293-
Text("When this option is enabled, photos will be automatically removed from your photo library and iCloud after they have been backed up.")
295+
Text(
296+
"When this option is enabled, photos will be automatically removed from your photo library and iCloud after they have been backed up."
297+
)
294298
}
295-
299+
296300
#if os(iOS)
297301
if photoBackup.purgeEnabled && photoBackup.enableBackgroundCopy {
298302
Text(

Sushitrain/SettingsView.swift

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ struct AdvancedSettingsView: View {
538538
"The operating system will periodically grant the app a few minutes of time in the background, depending on network connectivity and battery status."
539539
)
540540
}
541-
541+
542542
if #available(iOS 26, *) {
543543
Section {
544544
if backgroundManager.runningContinuedTask != nil {
@@ -549,33 +549,35 @@ struct AdvancedSettingsView: View {
549549
Button("For 10 seconds", systemImage: "gearshape.2.fill") {
550550
self.startBackgroundSyncFor(.time(seconds: 10))
551551
}.disabled(backgroundManager.runningContinuedTask != nil)
552-
552+
553553
Button("For 1 minute", systemImage: "gearshape.2.fill") {
554554
self.startBackgroundSyncFor(.time(seconds: 60))
555555
}.disabled(backgroundManager.runningContinuedTask != nil)
556-
556+
557557
Button("For 10 minutes", systemImage: "gearshape.2.fill") {
558558
self.startBackgroundSyncFor(.time(seconds: 10 * 60))
559559
}.disabled(backgroundManager.runningContinuedTask != nil)
560-
560+
561561
Button("For 1 hour", systemImage: "gearshape.2.fill") {
562562
self.startBackgroundSyncFor(.time(seconds: 60 * 60))
563563
}.disabled(backgroundManager.runningContinuedTask != nil)
564564
}
565565
}
566566
} footer: {
567-
Text("At your request, the app can synchronize in the background for a specific amount of time. You can also access these options by long-pressing the status item on the start screen.")
568-
}.alert(
569-
"An error has occurred", isPresented: Binding.isNotNil($showError),
570-
actions: {
571-
Button("OK") {
572-
showError = nil
573-
}
574-
},
575-
message: {
576-
Text(showError?.localizedDescription ?? "")
577-
}
578-
)
567+
Text(
568+
"At your request, the app can synchronize in the background for a specific amount of time. You can also access these options by long-pressing the status item on the start screen."
569+
)
570+
}.alert(
571+
"An error has occurred", isPresented: Binding.isNotNil($showError),
572+
actions: {
573+
Button("OK") {
574+
showError = nil
575+
}
576+
},
577+
message: {
578+
Text(showError?.localizedDescription ?? "")
579+
}
580+
)
579581
}
580582

581583
Section {
@@ -683,7 +685,7 @@ struct AdvancedSettingsView: View {
683685
Alert(title: Text("Background synchronization"), message: Text(alertMessage))
684686
})
685687
}
686-
688+
687689
@available(iOS 26, *) private func startBackgroundSyncFor(_ type: ContinuedTaskType) {
688690
withAnimation {
689691
do {
@@ -993,7 +995,9 @@ private struct BandwidthSettingsView: View {
993995
}
994996

995997
#if os(iOS)
996-
NavigationLink(destination: BackgroundSettingsView(userSettings: userSettings, backgroundManager: appState.backgroundManager)) {
998+
NavigationLink(
999+
destination: BackgroundSettingsView(userSettings: userSettings, backgroundManager: appState.backgroundManager)
1000+
) {
9971001
Text("Background synchronization").badge(
9981002
userSettings.longBackgroundSyncEnabled || userSettings.shortBackgroundSyncEnabled ? "On" : "Off")
9991003
}

Sushitrain/SupportView.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ struct TroubleshootingView: View {
442442
}
443443
}
444444
#endif
445-
445+
446446
Section {
447447
Button("Reset device identity", role: .destructive) {
448448
self.showResetDeviceIdentity = true
@@ -453,7 +453,9 @@ struct TroubleshootingView: View {
453453
exit(0)
454454
}
455455
} message: {
456-
Text("If you reset the device identity, the device ID will change, and you will have to re-add this device to all other devices. Any files on this device will not be removed, but synchronization will not work until the other devices have re-accepted the new identity of this device again. Resetting the device identity should only be necessary if you have migrated from another device. The app will close to reset the device identity. This cannot be undone!")
456+
Text(
457+
"If you reset the device identity, the device ID will change, and you will have to re-add this device to all other devices. Any files on this device will not be removed, but synchronization will not work until the other devices have re-accepted the new identity of this device again. Resetting the device identity should only be necessary if you have migrated from another device. The app will close to reset the device identity. This cannot be undone!"
458+
)
457459
}
458460
}
459461
}

0 commit comments

Comments
 (0)