Кэш чатов

This commit is contained in:
Халимов Рустам
2026-04-20 00:25:40 +03:00
parent 945134f029
commit 7c66e1c0c0
35 changed files with 2131 additions and 92 deletions
+7 -5
View File
@@ -61,7 +61,7 @@ fun AppNavigation(
when (event) {
is core.utils.NavEvent.OpenChat -> {
if (authState.isAuthenticated) {
navController.navigate(Screen.ChatDetail.createRoute(event.chatId, "Chat")) {
navController.navigate(Screen.ChatDetail.createRoute(event.chatId, event.chatName)) {
launchSingleTop = true
}
}
@@ -149,8 +149,10 @@ fun AppNavigation(
ChatListScreen(
viewModel = viewModel,
storyViewModel = storyViewModel,
onChatClick = { chatId ->
navController.navigate(Screen.ChatDetail.createRoute(chatId, "Chat"))
onChatClick = { chatId, chatName ->
navController.navigate(Screen.ChatDetail.createRoute(chatId, chatName)) {
launchSingleTop = true
}
},
onStoryClick = { /* Story click logic */ }
)
@@ -183,7 +185,7 @@ fun AppNavigation(
onContactClick = { id -> navController.navigate(Screen.Profile.createRoute(id)) },
onSearchChange = { viewModel.onSearchChange(it) },
onAddContact = { id -> viewModel.addContact(id) },
onStartChat = { id -> viewModel.startChat(id) },
onStartChat = { id, name -> viewModel.startChat(id, name) },
onAcceptRequest = { id -> viewModel.acceptRequest(id) },
onDeclineRequest = { id -> viewModel.declineRequest(id) }
)
@@ -205,7 +207,7 @@ fun AppNavigation(
viewModel = viewModel,
onEditProfile = { navController.navigate(Screen.EditProfile.route) },
onBack = { navController.popBackStack() },
onSendMessage = { id -> navController.navigate(Screen.ChatDetail.createRoute(id, "Chat")) }
onSendMessage = { id, name -> navController.navigate(Screen.ChatDetail.createRoute(id, name)) }
)
}
composable(Screen.EditProfile.route) {