PlatformMedia
Depending on the configured MediaStore you may have access to more than the ByteArrayFlow. For example:
check(platformMedia is OpfsPlatformMedia)
platformMedia.getTemporaryFile()Content copied to clipboard
Inheritors
Functions
Link copied to clipboard
Link copied to clipboard
inline fun <K, V> Flow<Map<K, Flow<V?>>>.flattenValues(throttle: Duration = 200.milliseconds): Flow<List<V>>
A change of the outer flow results in new collect of the inner flows. Because this is an expensive operation, the outer flow is throttled by default.
fun Flow<Map<RoomId, Flow<Room?>>>.flattenValues(throttle: Duration = 200.milliseconds, filterUpgradedRooms: Boolean = true): Flow<Set<Room>>
This collects all rooms, so when one changes, a new set gets emitted. A change of the outer flow results in new collect of the inner flows. Because this is an expensive operation, the outer flow is throttled by default.
Link copied to clipboard
abstract suspend fun toByteArray(coroutineScope: CoroutineScope? = null, expectedSize: Long? = null, maxSize: Long? = null): ByteArray?
Creates a ByteArray and stores it into a cache for re-use.
Link copied to clipboard
fun Flow<Flow<TimelineEvent>>.toFlowList(maxSize: StateFlow<Int>, minSize: MutableStateFlow<Int> = MutableStateFlow(0)): Flow<List<Flow<TimelineEvent>>>
Converts a flow of timeline events into a flow of list of timeline events limited by maxSize.
fun Flow<Flow<Flow<TimelineEvent>>?>.toFlowList(maxSize: StateFlow<Int>, minSize: MutableStateFlow<Int> = MutableStateFlow(0)): Flow<List<Flow<TimelineEvent>>>
Converts a flow of flows of timeline event into a flow of list of timeline events limited by maxSize.
Link copied to clipboard