feat: Refactor ChatsListScreen to move drawer state initialization and coroutine scope to the top
This commit is contained in:
@@ -156,6 +156,8 @@ fun ChatsListScreen(
|
||||
}
|
||||
|
||||
val view = androidx.compose.ui.platform.LocalView.current
|
||||
val drawerState = rememberDrawerState(initialValue = DrawerValue.Closed)
|
||||
val scope = rememberCoroutineScope()
|
||||
|
||||
// Update status bar and navigation bar
|
||||
LaunchedEffect(isDarkTheme, drawerState.isOpen) {
|
||||
@@ -197,9 +199,6 @@ fun ChatsListScreen(
|
||||
label = "dividerColor"
|
||||
)
|
||||
|
||||
val drawerState = rememberDrawerState(initialValue = DrawerValue.Closed)
|
||||
val scope = rememberCoroutineScope()
|
||||
|
||||
// Protocol connection state
|
||||
val protocolState by ProtocolManager.state.collectAsState()
|
||||
val debugLogs by ProtocolManager.debugLogs.collectAsState()
|
||||
|
||||
Reference in New Issue
Block a user