Improve AnnouncementService.
This commit is contained in:
parent
2526141067
commit
a786f6a5e9
20 changed files with 169 additions and 81 deletions
|
|
@ -9,4 +9,5 @@ package io.element.android.features.announcement.api
|
|||
|
||||
enum class Announcement {
|
||||
Space,
|
||||
NewNotificationSound,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,10 +9,18 @@ package io.element.android.features.announcement.api
|
|||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
interface AnnouncementService {
|
||||
suspend fun showAnnouncement(announcement: Announcement)
|
||||
|
||||
suspend fun onAnnouncementDismissed(announcement: Announcement)
|
||||
|
||||
fun announcementsToShowFlow(): Flow<List<Announcement>>
|
||||
|
||||
/**
|
||||
* Use this composable to render the announcement UI in Fullscreen.
|
||||
*/
|
||||
@Composable
|
||||
fun Render(
|
||||
modifier: Modifier,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue