PollHistoryService

interface PollHistoryService

Expose methods to get history of polls in rooms.

Functions

Link copied to clipboard
abstract fun dispose()

This must be called when you don't need the service anymore. It ensures the underlying database get closed.

Link copied to clipboard
abstract suspend fun getLoadedPollsStatus(): LoadedPollsStatus

Get the current status of the loaded polls.

Link copied to clipboard
abstract fun getPollEvents(): LiveData<List<TimelineEvent>>

Get currently loaded list of poll events. See loadMore.

Link copied to clipboard
abstract suspend fun loadMore(): LoadedPollsStatus

Ask to load more polls starting from last loaded polls for a period defined by loadingPeriodInDays.

Link copied to clipboard
abstract suspend fun syncPolls()

Sync polls from last loaded polls until now.

Properties

Link copied to clipboard
abstract val loadingPeriodInDays: Int

The number of days covered when requesting to load more polls.