Package-level declarations

Types

Link copied to clipboard
data class HandleCreatePollOptions(val poll: Poll, val socket: SocketManager? = null, val roomName: String, val showAlert: ShowAlert? = null, val updateIsPollModalVisible: (Boolean) -> Unit)

Defines options for creating a poll in a room.

Link copied to clipboard

Type definition for handling poll creation.

Link copied to clipboard
data class HandleEndPollOptions(val pollId: String, val socket: SocketManager? = null, val showAlert: ShowAlert? = null, val roomName: String, val updateIsPollModalVisible: (Boolean) -> Unit)

Defines options for handling the end of a poll.

Link copied to clipboard

Type definition for handling poll ending.

Link copied to clipboard
data class HandleVotePollOptions(val pollId: String, val optionIndex: Int, val socket: SocketManager? = null, val showAlert: ShowAlert? = null, val member: String, val roomName: String, val updateIsPollModalVisible: (Boolean) -> Unit)

Defines options for handling a poll vote.

Link copied to clipboard

Type definition for handling poll voting.

Link copied to clipboard
data class LaunchPollOptions(val updateIsPollModalVisible: UpdateIsPollModalVisible, val isPollModalVisible: Boolean)

Defines options for toggling the poll modal visibility.

Link copied to clipboard

Type definition for the function that toggles the poll modal visibility.

Link copied to clipboard
data class PollUpdatedOptions(val data: PollUpdatedData, val polls: List<Poll>, val poll: Poll? = null, val member: String, val islevel: String, val showAlert: ShowAlert? = null, val updatePolls: (List<Poll>) -> Unit, val updatePoll: (Poll) -> Unit, val updateIsPollModalVisible: (Boolean) -> Unit)

Defines options for updating poll information.

Link copied to clipboard
typealias PollUpdatedType = suspend (PollUpdatedOptions) -> Unit

Type definition for the function that updates poll information.

Link copied to clipboard

Type definition for updating poll modal visibility.

Functions

Link copied to clipboard

Handles the creation of a poll by emitting a "createPoll" event with the provided details. Shows an alert based on the success or failure of the operation.

Link copied to clipboard
suspend fun handleEndPoll(options: HandleEndPollOptions)

Handles ending a poll by emitting an "endPoll" event through the provided socket. Displays an alert based on the success or failure of the operation.

Link copied to clipboard

Handles the voting process for a poll.

Link copied to clipboard

Toggles the visibility of the poll modal based on the current state.

Link copied to clipboard
suspend fun pollUpdated(options: PollUpdatedOptions)

Updates the poll state based on the provided options.