修复部分卡顿问题

pull/14/head
minxiwan 2 weeks ago
parent c5b9d779ad
commit af50d78f78

@ -73,6 +73,8 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.lifecycle.viewmodel.compose.viewModel
import androidx.compose.foundation.isSystemInDarkTheme
import android.os.Build
import androidx.compose.foundation.horizontalScroll
import androidx.compose.foundation.rememberScrollState
import com.onlinemsg.client.ui.theme.OnlineMsgTheme
import java.time.Instant
import java.time.ZoneId
@ -661,8 +663,11 @@ private fun SettingsTab(
if (state.serverUrls.isNotEmpty()) {
HorizontalDivider()
Text(language("settings.saved_servers"), style = MaterialTheme.typography.labelLarge)
LazyRow(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
items(state.serverUrls) { url ->
Row(
modifier = Modifier.horizontalScroll(rememberScrollState()),
horizontalArrangement = Arrangement.spacedBy(8.dp)
) {
state.serverUrls.forEach { url ->
AssistChip(
onClick = { onSelectServer(url) },
label = { Text(url, maxLines = 1, overflow = TextOverflow.Ellipsis) }

@ -46,10 +46,10 @@ object LanguageManager {
"theme.green" to "翠绿",
"theme.red" to "绯红",
"theme.warm" to "温暖",
"top_bar.link" to "已连接",
"top_bar.dislink" to "未连接",
"top_bar.link_start" to "连接",
"top_bar.error_dislink" to "异常断开",
"status.idle" to "连接断开",
"status.connecting" to "连接中",
"status.ready" to "连接",
"status.error" to "异常断开",
"status_hint.ready" to "已连接,可以开始聊天",
"status_hint.click_to_connect" to "点击连接开始聊天",
@ -70,7 +70,6 @@ object LanguageManager {
"status_hint.authenticating" to "正在完成身份验证...",
"status_hint.auth_timeout" to "连接超时,请重试",
"status_hint.auth_failed" to "认证失败",
"status_hint.ready" to "已连接,可以开始聊天",
"status_hint.reconnecting" to "正在自动重试连接...",
"status_hint.connection_interrupted_retrying" to "连接已中断,正在重试",
"status_hint.reconnect_countdown" to "%d秒后自动重连第 %d 次)",
@ -140,7 +139,6 @@ object LanguageManager {
"status_hint.authenticating" to "Authenticating...",
"status_hint.auth_timeout" to "Connection timeout, please retry",
"status_hint.auth_failed" to "Authentication failed",
"status_hint.ready" to "Connected, ready to chat",
"status_hint.reconnecting" to "Reconnecting...",
"status_hint.connection_interrupted_retrying" to "Connection interrupted, retrying",
"status_hint.reconnect_countdown" to "Reconnecting in %d seconds (attempt %d)",
@ -210,7 +208,6 @@ object LanguageManager {
"status_hint.authenticating" to "認証中...",
"status_hint.auth_timeout" to "接続タイムアウト、再試行してください",
"status_hint.auth_failed" to "認証に失敗しました",
"status_hint.ready" to "接続完了、チャットを開始できます",
"status_hint.reconnecting" to "自動再接続中...",
"status_hint.connection_interrupted_retrying" to "接続が切断されました、再試行中",
"status_hint.reconnect_countdown" to "%d秒後に再接続%d回目",
@ -280,7 +277,6 @@ object LanguageManager {
"status_hint.authenticating" to "인증 중...",
"status_hint.auth_timeout" to "연결 시간 초과, 다시 시도하세요",
"status_hint.auth_failed" to "인증 실패",
"status_hint.ready" to "연결됨, 채팅 가능",
"status_hint.reconnecting" to "자동 재연결 중...",
"status_hint.connection_interrupted_retrying" to "연결이 끊어짐, 재시도 중",
"status_hint.reconnect_countdown" to "%d초 후 자동 재연결 (시도 %d회)",

Loading…
Cancel
Save