mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Add KDoc to the single-interface feature API modules
Cover the last remaining interfaces across features/announcement, cachecleaner, call, contentscanner, createroom, knockrequests, lockscreen, rolesandpermissions, startchat, userprofile and viewfolder, with their members and parameters. Grouped into one commit rather than eleven near-empty ones, per the AGENTS.md rule about tiny commits. This completes every features/* api module. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+19
@@ -12,15 +12,34 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
/**
|
||||
* Queues the full-screen announcements shown to the user once, such as the notice about a new feature.
|
||||
*
|
||||
* A dismissed announcement is remembered so it is not shown again.
|
||||
*/
|
||||
interface AnnouncementService {
|
||||
/**
|
||||
* Queues an announcement, unless the user has already dismissed it.
|
||||
*
|
||||
* @param announcement the announcement to show.
|
||||
*/
|
||||
suspend fun showAnnouncement(announcement: Announcement)
|
||||
|
||||
/**
|
||||
* Records that the user dismissed an announcement, so it is not queued again.
|
||||
*
|
||||
* @param announcement the announcement that was dismissed.
|
||||
*/
|
||||
suspend fun onAnnouncementDismissed(announcement: Announcement)
|
||||
|
||||
/** The announcements still waiting to be shown, in the order they should appear. */
|
||||
fun announcementsToShowFlow(): Flow<List<Announcement>>
|
||||
|
||||
/**
|
||||
* Use this composable to render the announcement UI in Fullscreen.
|
||||
* Draws nothing while there is no announcement to show.
|
||||
*
|
||||
* @param modifier layout modifier for the container.
|
||||
*/
|
||||
@Composable
|
||||
fun Render(
|
||||
|
||||
Reference in New Issue
Block a user