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 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()
|
||||||
|
|||||||
Reference in New Issue
Block a user