Improve AnnouncementService.

This commit is contained in:
Benoit Marty 2025-10-08 09:45:44 +02:00
parent 2526141067
commit a786f6a5e9
20 changed files with 169 additions and 81 deletions

View file

@ -9,4 +9,5 @@ package io.element.android.features.announcement.api
enum class Announcement {
Space,
NewNotificationSound,
}

View file

@ -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,