This commit is contained in:
Халимов Рустам
2026-04-15 02:40:52 +03:00
parent 9560a9235f
commit 8409c51842
16 changed files with 207 additions and 34 deletions

View File

@@ -0,0 +1,19 @@
package core.utils
import javax.inject.Inject
import javax.inject.Singleton
import kotlinx.coroutines.flow.MutableSharedFlow
sealed class NavEvent {
data class OpenChat(val chatId: String) : NavEvent()
}
@Singleton
class NavigationManager @Inject constructor() {
private val _events = MutableSharedFlow<NavEvent>(extraBufferCapacity = 1)
val events = _events
fun navigateToChat(chatId: String) {
_events.tryEmit(NavEvent.OpenChat(chatId))
}
}