Skip to content

Commit

Permalink
Remove UserSettings.showMenuSettingChanged, indicatorConfigurationCha…
Browse files Browse the repository at this point in the history
…nged
  • Loading branch information
tekezo committed Jan 23, 2025
1 parent 8559097 commit 9df8efc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
10 changes: 2 additions & 8 deletions src/ShowyEdge/swift/IndicatorsController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,10 @@ class IndicatorsController {
self.updateColorByInputSource()
}

NotificationCenter.default.addObserver(
forName: UserSettings.indicatorConfigurationChanged,
object: nil,
queue: .main
) { [weak self] _ in
guard let self = self else { return }

userSettings.objectWillChange.sink { _ in
self.updateWindowFrames()
self.updateColorByInputSource()
}
}.store(in: &cancellables)

setupWindows()
updateWindowFrames()
Expand Down
3 changes: 0 additions & 3 deletions src/ShowyEdge/swift/UserSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ enum CustomFrameUnit: Int {
}

final class UserSettings: ObservableObject {
static let showMenuSettingChanged = Notification.Name("ShowMenuSettingChanged")
static let indicatorConfigurationChanged = Notification.Name("IndicatorConfigurationChanged")

@AppStorage("initialOpenAtLoginRegistered") var initialOpenAtLoginRegistered = false

//
Expand Down

0 comments on commit 9df8efc

Please sign in to comment.