Skip to main content

ChatChannelController.ObservableObject

A wrapper object for ChannelListController type which makes it possible to use the controller comfortably in SwiftUI.

public class ObservableObject: SwiftUI.ObservableObject 

Inheritance

ChatChannelControllerDelegate, SwiftUI.ObservableObject

Properties

controller

The underlying controller. You can still access it and call methods on it.

public let controller: ChatChannelController

channel

The channel matching the ChannelId.

@Published public private(set) var channel: ChatChannel?

messages

The messages related to the channel.

@Published public private(set) var messages: LazyCachedMapCollection<ChatMessage> = []

state

The current state of the Controller.

@Published public private(set) var state: DataController.State

typingUsers

The typing users related to the channel.

@Published public private(set) var typingUsers: Set<ChatUser> = []

Methods

channelController(_:didUpdateChannel:)

public func channelController(
_ channelController: ChatChannelController,
didUpdateChannel channel: EntityChange<ChatChannel>
)

channelController(_:didUpdateMessages:)

public func channelController(
_ channelController: ChatChannelController,
didUpdateMessages changes: [ListChange<ChatMessage>]
)

controller(_:didChangeState:)

public func controller(_ controller: DataController, didChangeState state: DataController.State) 

channelController(_:didChangeTypingUsers:)

public func channelController(
_ channelController: ChatChannelController,
didChangeTypingUsers typingUsers: Set<ChatUser>
)

Did you find this page helpful?