Skip to content

Commit

Permalink
Adjust linting
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsaidi committed Apr 24, 2024
1 parent f8bd773 commit efadc4a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Demo/Demo/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ private extension ContentView {

func presentSilentMode() {
notification.presentMessage(
.silentMode(on: isSilentModeOn)
.silentMode(isOn: isSilentModeOn)
)
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/SystemNotification/SystemNotification.swift
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ private extension SystemNotification {
}
.systemNotification(notification)
.onChange(of: isSilentModeEnabled) { value in
notification.presentMessage(.silentMode(on: value))
notification.presentMessage(.silentMode(isOn: value))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ public extension SystemNotificationMessage where IconView == AnyView {

/// This message mimics a native iOS silent mode message.
static func silentMode(
on: Bool,
isOn: Bool,
title: LocalizedStringKey? = nil
) -> Self {
.init(
icon: AnyView(SilentModeBell(isSilentModeOn: on)),
text: title ?? "Silent Mode \(on ? "On" : "Off")"
icon: AnyView(SilentModeBell(isSilentModeOn: isOn)),
text: title ?? "Silent Mode \(isOn ? "On" : "Off")"
)
}
}
Expand Down Expand Up @@ -153,8 +153,8 @@ private extension SilentModeBell {
#Preview {

VStack {
SystemNotificationMessage.silentMode(on: true)
SystemNotificationMessage.silentMode(on: false)
SystemNotificationMessage.silentMode(isOn: true)
SystemNotificationMessage.silentMode(isOn: false)
SystemNotificationMessage.error(title: "Error!", text: "Something failed!")
SystemNotificationMessage.success(title: "Success!", text: "You did it!")
SystemNotificationMessage.warning(title: "Warning!", text: "Danger ahead!")
Expand Down

0 comments on commit efadc4a

Please sign in to comment.