test2
This commit is contained in:
parent
6e0e3d4930
commit
198873ecad
@ -223,6 +223,9 @@ fun AndroidScreen(settingsState: SettingsViewState) {
|
||||
}
|
||||
}
|
||||
}
|
||||
LaunchedEffect(Unit) {
|
||||
testUserSwitching()
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
@ -331,3 +334,31 @@ fun InitializationView() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun testUserSwitching() {
|
||||
val users = chatModel.controller.listUsers().map { it.user.userId }
|
||||
testChatSwitching()
|
||||
delay(3000)
|
||||
chatModel.controller.changeActiveUser(users[0], null)
|
||||
testChatSwitching()
|
||||
chatModel.controller.changeActiveUser(users[1], null)
|
||||
testChatSwitching()
|
||||
chatModel.controller.changeActiveUser(users[0], null)
|
||||
testChatSwitching()
|
||||
chatModel.controller.changeActiveUser(users[1], null)
|
||||
testChatSwitching()
|
||||
}
|
||||
|
||||
private suspend fun testChatSwitching() {
|
||||
openChat(chatModel.getChat(chatModel.chats[0].id)!!.chatInfo, chatModel)
|
||||
delay(300)
|
||||
openChat(chatModel.getChat(chatModel.chats[1].id)!!.chatInfo, chatModel)
|
||||
delay(1000)
|
||||
openChat(chatModel.getChat(chatModel.chats[2].id)!!.chatInfo, chatModel)
|
||||
delay(500)
|
||||
openChat(chatModel.getChat(chatModel.chats[1].id)!!.chatInfo, chatModel)
|
||||
delay(10)
|
||||
openChat(chatModel.getChat(chatModel.chats[0].id)!!.chatInfo, chatModel)
|
||||
delay(10)
|
||||
openChat(chatModel.getChat(chatModel.chats[2].id)!!.chatInfo, chatModel)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user