Skip to content

Commit 9f5594e

Browse files
committed
Change the name from disablePushNotifications to snoozePushNotifications
1 parent 8e87089 commit 9f5594e

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

DemoApp/Screens/UserProfile/UserProfileViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ class UserProfileViewController: UITableViewController, CurrentChatUserControlle
180180
}
181181
},
182182
onDisableNotifications: { [weak self] date, completion in
183-
self?.currentUserController.disablePushNotifications(until: date) {
183+
self?.currentUserController.snoozePushNotifications(until: date) {
184184
completion($0.map(\.level))
185185
}
186186
},

DemoApp/StreamChat/Components/DemoChatChannelListRouter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ final class DemoChatChannelListRouter: ChatChannelListRouter {
715715
}
716716
},
717717
onDisableNotifications: { date, completion in
718-
channelController.disablePushNotifications(until: date) {
718+
channelController.snoozePushNotifications(until: date) {
719719
completion($0.map(\.level))
720720
}
721721
},

Sources/StreamChat/Controllers/ChannelController/ChannelController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1720,11 +1720,11 @@ public class ChatChannelController: DataController, DelegateCallable, DataStoreP
17201720
}
17211721
}
17221722

1723-
/// Disables the push notifications for this channel.
1723+
/// Temporarily disables the push notifications for this channel.
17241724
/// - Parameters:
17251725
/// - date: The date until when the push notifications will be enabled back.
17261726
/// - completion: The completion call once the request is finished.
1727-
public func disablePushNotifications(
1727+
public func snoozePushNotifications(
17281728
until date: Date,
17291729
completion: ((Result<PushPreference, Error>) -> Void)? = nil
17301730
) {

Sources/StreamChat/Controllers/CurrentUserController/CurrentUserController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,11 +479,11 @@ public extension CurrentChatUserController {
479479
}
480480
}
481481

482-
/// Disables the push notifications globally for the current user.
482+
/// Temporarily disables the push notifications globally for the current user.
483483
/// - Parameters:
484484
/// - date: The date until when the push notifications will be enabled back.
485485
/// - completion: The completion call once the request is finished.
486-
func disablePushNotifications(
486+
func snoozePushNotifications(
487487
until date: Date,
488488
completion: ((Result<PushPreference, Error>) -> Void)? = nil
489489
) {

0 commit comments

Comments
 (0)