Skip to content

Commit 6c479a8

Browse files
committed
🚣‍♀️ Row those changes back
1 parent 7d2e74d commit 6c479a8

15 files changed

Lines changed: 53 additions & 61 deletions

File tree

Loop/Migration/Migrator.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,9 @@ private extension Migrator {
447447
// Reference: https://x.com/leoshimo/status/1975642593569738755
448448
/// If building on macOS 15 and below, comment out the following if statement
449449
/// Remember to uncomment before committing the PR
450-
// if #available(macOS 26.0, *) {
451-
// alert.buttons.first?.tintProminence = .primary
452-
// }
450+
if #available(macOS 26.0, *) {
451+
alert.buttons.first?.tintProminence = .primary
452+
}
453453

454454
if let window = NSApp.keyWindow ?? NSApp.mainWindow {
455455
return await alert.beginSheetModal(for: window)

Loop/Settings Window/Settings/Behavior/BehaviorConfiguration.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ struct BehaviorConfigurationView: View {
5858
private var generalSection: some View {
5959
LuminareSection(String(localized: "General", comment: "Section header shown in settings")) {
6060
LuminareToggle("Launch at login", isOn: $launchAtLogin)
61-
.onChange(of: launchAtLogin) { newValue in
61+
.onChange(of: launchAtLogin) { _ in
6262
do {
63-
if newValue {
63+
if launchAtLogin {
6464
try SMAppService().register()
6565
} else {
6666
try SMAppService().unregister()

Loop/Settings Window/Settings/Behavior/Padding Configuration/PaddingConfigurationView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ struct PaddingConfigurationView: View {
4747
.luminareAspectRatio(contentMode: .fill)
4848
.buttonStyle(.luminareCompact)
4949
}
50-
.onChange(of: paddingModel) { newValue in
50+
.onChange(of: paddingModel) { _ in
5151
// This fixes some weird animations.
52-
Defaults[.padding] = newValue
52+
Defaults[.padding] = paddingModel
5353
}
5454
}
5555

Loop/Settings Window/Settings/Keybindings/Item View/KeybindItemView.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ struct KeybindItemView: View {
4343
}
4444
.animation(luminareAnimation, value: action)
4545
.padding(.horizontal, 12)
46-
.onChange(of: isHovering) { hovering in
47-
if !hovering {
46+
.onChange(of: isHovering) { _ in
47+
if !isHovering {
4848
isPickerPresented = false
4949
}
5050
}
51-
.onChange(of: action.direction) { newDirection in
52-
if newDirection.isCustomizable {
51+
.onChange(of: action.direction) { _ in
52+
if action.direction.isCustomizable {
5353
isConfiguringCustom = true
5454
}
55-
if newDirection == .cycle {
55+
if action.direction == .cycle {
5656
isConfiguringCycle = true
5757
}
5858
}

Loop/Settings Window/Settings/Keybindings/Keybind Recorder/Keycorder.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,19 @@ struct Keycorder: View {
8181
.onHover { hovering in
8282
isHovering = hovering
8383
}
84-
.onChange(of: model.currentEventMonitor) { newMonitor in
85-
if newMonitor != eventMonitor {
84+
.onChange(of: model.currentEventMonitor) { _ in
85+
if model.currentEventMonitor != eventMonitor {
8686
finishedObservingKeys(wasForced: true)
8787
}
8888
}
89-
.onChange(of: appearsActive) { newValue in
90-
if newValue {
89+
.onChange(of: appearsActive) { _ in
90+
if appearsActive {
9191
finishedObservingKeys(wasForced: true)
9292
}
9393
}
94-
.onChange(of: validCurrentKeybind) { newValue in
95-
if selectionKeybind != newValue {
96-
selectionKeybind = newValue
94+
.onChange(of: validCurrentKeybind) { _ in
95+
if selectionKeybind != validCurrentKeybind {
96+
selectionKeybind = validCurrentKeybind
9797
}
9898
}
9999
.buttonStyle(.plain)

Loop/Settings Window/Settings/Keybindings/Keybind Recorder/TriggerKeycorder.swift

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,16 @@ struct TriggerKeycorder: View {
7070
.onHover { hovering in
7171
isHovering = hovering
7272
}
73-
.onChange(of: model.currentEventMonitor) { newMonitor in
74-
if newMonitor != eventMonitor {
73+
.onChange(of: model.currentEventMonitor) { _ in
74+
if model.currentEventMonitor != eventMonitor {
7575
finishedObservingKeys(wasForced: true)
7676
}
7777
}
78-
.onChange(of: validCurrentKey) { newValue in
79-
if selectionKey != newValue {
80-
selectionKey = newValue
78+
.onChange(of: validCurrentKey) { _ in
79+
if selectionKey != validCurrentKey {
80+
selectionKey = validCurrentKey
8181
}
8282
}
83-
8483
.fixedSize()
8584
.buttonStyle(.luminareCompact)
8685

Loop/Settings Window/Settings/Keybindings/Modal Views/CustomActionConfigurationView.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ struct CustomActionConfigurationView: View {
6666
.frame(width: geo.size.width, height: geo.size.height, alignment: .topLeading)
6767
}
6868
}
69-
.onChange(of: action) { newAction in
70-
windowAction = newAction
71-
}
69+
.onChange(of: action) { windowAction = $0 }
7270

7371
configurationSections()
7472
actionButtons()

Loop/Settings Window/Settings/Keybindings/Modal Views/CycleActionConfigurationView.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,7 @@ struct CycleActionConfigurationView: View {
8686
.luminareListRoundedCorner(bottom: .always)
8787
.luminareListFixedHeight(until: .infinity)
8888
}
89-
.onChange(of: action) { newAction in
90-
windowAction = newAction
91-
}
89+
.onChange(of: action) { windowAction = $0 }
9290

9391
Button {
9492
isPresented = false

Loop/Settings Window/Settings/Keybindings/Modal Views/StashActionConfigurationView.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@ struct StashActionConfigurationView: View {
7373
.frame(width: geo.size.width, height: geo.size.height, alignment: .topLeading)
7474
}
7575
}
76-
.onChange(of: action) { newAction in
77-
windowAction = newAction
78-
}
76+
.onChange(of: action) { windowAction = $0 }
7977

8078
configurationSections()
8179
actionButtons()

Loop/Settings Window/Theming/IconConfiguration.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ final class IconConfigurationModel: ObservableObject {
7979
// Reference: https://x.com/leoshimo/status/1975642593569738755
8080
/// If building on macOS 15 and below, comment out the following if statement
8181
/// Remember to uncomment before committing the PR
82-
// if #available(macOS 26.0, *) {
83-
// button.tintProminence = .primary
84-
// }
82+
if #available(macOS 26.0, *) {
83+
button.tintProminence = .primary
84+
}
8585

8686
alert.alertStyle = .warning
8787
let modalResponse = await alert.beginSheetModal(for: window)
@@ -196,13 +196,13 @@ struct IconVew: View {
196196
loopsLeft = nextUnlockCount - timesLooped
197197
}
198198
}
199-
.onChange(of: timesLooped) { newValue in
199+
.onChange(of: timesLooped) { _ in
200200
withAnimation(luminareAnimation) {
201201
hasBeenUnlocked = icon.isSelectable
202202

203203
if !hasBeenUnlocked {
204-
nextUnlockCount = model.nextIconUnlockLoopCount(timesLooped: newValue)
205-
loopsLeft = nextUnlockCount - newValue
204+
nextUnlockCount = model.nextIconUnlockLoopCount(timesLooped: timesLooped)
205+
loopsLeft = nextUnlockCount - timesLooped
206206
}
207207
}
208208
}

0 commit comments

Comments
 (0)