Archived Channels
Last updated
Was this helpful?
Last updated
Was this helpful?
The queryArchivedChannels
function allows users to retrieve a list of archived channels. This function uses a LiveCollectionStream
to fetch the data and provides real-time updates on the fetching status. It also supports pagination to load more data when the user scrolls to the end of the list.
Prepare the Query: The function initializes a LiveCollectionStream to fetch archived channels.
Observe the Stream: The getStream method is used to listen for updates, providing the list of channels and the fetching status.
Pagination: A ScrollController is used to detect when the user scrolls to the end of the list, triggering the loadNext method to fetch the next page of data.
The archiveChannel
function allows users to archive a specific conversation channel. Archiving a channel removes it from the active list channel but retains its data for future reference. This function takes one parameter, channelId, which specifies the ID of the channel to be archived.
The unarchiveChannel
function allows users to restore an archived conversation channel back to the active channel list. This function takes one parameter, channelId, which specifies the ID of the channel to be unarchived.