add notifcaiton support with unmount button

This commit is contained in:
2026-03-10 01:01:20 +05:00
parent 0c5524a9a5
commit 93c239eb12
9 changed files with 259 additions and 0 deletions
@@ -0,0 +1,22 @@
package sh.sar.isodroid.isodrive
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.asSharedFlow
object MountEventBus {
private val _events = MutableSharedFlow<MountEvent>(extraBufferCapacity = 1)
val events = _events.asSharedFlow()
fun emitUnmounted() {
_events.tryEmit(MountEvent.Unmounted)
}
fun emitMounted() {
_events.tryEmit(MountEvent.Mounted)
}
}
sealed class MountEvent {
data object Mounted : MountEvent()
data object Unmounted : MountEvent()
}