This commit is contained in:
Avently 2024-01-06 03:44:01 +07:00
parent 60357d271a
commit 5b78bbae5b

View File

@ -3,15 +3,19 @@ package chat.simplex.common.views.usersettings
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import dev.icerock.moko.resources.compose.stringResource
import androidx.compose.desktop.ui.tooling.preview.Preview
import androidx.compose.runtime.*
import chat.simplex.common.model.AgentErrorType
import chat.simplex.common.model.ChatController
import chat.simplex.common.ui.theme.DEFAULT_PADDING
import chat.simplex.common.ui.theme.SimpleXTheme
import chat.simplex.common.views.chatlist.ChatHelpView
import chat.simplex.common.views.helpers.AppBarTitle
import chat.simplex.common.views.helpers.withBGApi
import chat.simplex.res.MR
import kotlinx.coroutines.delay
@Composable
fun HelpView(userDisplayName: String) {
@ -28,6 +32,15 @@ fun HelpLayout(userDisplayName: String) {
){
AppBarTitle(String.format(stringResource(MR.strings.personal_welcome), userDisplayName), withPadding = false)
ChatHelpView()
LaunchedEffect(Unit) {
ChatController.chatModel.processedCriticalError.newError(AgentErrorType.CRITICAL(false, "OOPS"), false)
withBGApi {
delay(5000)
ChatController.chatModel.processedCriticalError.newError(AgentErrorType.CRITICAL(false, "OOPS2"), false)
delay(20000)
ChatController.chatModel.processedCriticalError.newError(AgentErrorType.CRITICAL(false, "OOPS3"), true)
}
}
}
}