CurrentChatUserController.ObservableObject
A wrapper object for CurrentUserController
type which makes it possible to use the controller comfortably in SwiftUI.
public class ObservableObject: SwiftUI.ObservableObject
Inheritance
CurrentChatUserControllerDelegate
, SwiftUI.ObservableObject
Properties
controller
The underlying controller. You can still access it and call methods on it.
public let controller: CurrentChatUserController
currentUser
The currently logged-in user.
@Published public private(set) var currentUser: CurrentChatUser?
unreadCount
The unread messages and channels count for the current user.
@Published public private(set) var unreadCount: UnreadCount = .noUnread
Methods
currentUserController(_:didChangeCurrentUserUnreadCount:)
public func currentUserController(
_ controller: CurrentChatUserController,
didChangeCurrentUserUnreadCount unreadCount: UnreadCount
)
currentUserController(_:didChangeCurrentUser:)
public func currentUserController(
_ controller: CurrentChatUserController,
didChangeCurrentUser currentUser: EntityChange<CurrentChatUser>
)