feat: Refactor ChatsListScreen to move drawer state initialization and coroutine scope to the top

This commit is contained in:
k1ngsterr1
2026-01-09 02:52:09 +05:00
parent d3b25ae64f
commit ff242a5c7f

View File

@@ -156,6 +156,8 @@ fun ChatsListScreen(
} }
val view = androidx.compose.ui.platform.LocalView.current val view = androidx.compose.ui.platform.LocalView.current
val drawerState = rememberDrawerState(initialValue = DrawerValue.Closed)
val scope = rememberCoroutineScope()
// Update status bar and navigation bar // Update status bar and navigation bar
LaunchedEffect(isDarkTheme, drawerState.isOpen) { LaunchedEffect(isDarkTheme, drawerState.isOpen) {
@@ -197,9 +199,6 @@ fun ChatsListScreen(
label = "dividerColor" label = "dividerColor"
) )
val drawerState = rememberDrawerState(initialValue = DrawerValue.Closed)
val scope = rememberCoroutineScope()
// Protocol connection state // Protocol connection state
val protocolState by ProtocolManager.state.collectAsState() val protocolState by ProtocolManager.state.collectAsState()
val debugLogs by ProtocolManager.debugLogs.collectAsState() val debugLogs by ProtocolManager.debugLogs.collectAsState()