From e4ea2035ffd8f7ecdf46485d12ba120ea9b2df0f Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Mon, 14 Mar 2022 21:03:36 +0000 Subject: [PATCH] android: fix app crashing on opening chats, build 12 (#439) --- apps/android/app/build.gradle | 2 +- .../app/src/main/java/chat/simplex/app/views/chat/ChatView.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/android/app/build.gradle b/apps/android/app/build.gradle index 7f61f6c7ac..77969cc338 100644 --- a/apps/android/app/build.gradle +++ b/apps/android/app/build.gradle @@ -11,7 +11,7 @@ android { applicationId "chat.simplex.app" minSdk 29 targetSdk 32 - versionCode 11 + versionCode 12 versionName "1.2" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/apps/android/app/src/main/java/chat/simplex/app/views/chat/ChatView.kt b/apps/android/app/src/main/java/chat/simplex/app/views/chat/ChatView.kt index c53f83d552..b5061bb55b 100644 --- a/apps/android/app/src/main/java/chat/simplex/app/views/chat/ChatView.kt +++ b/apps/android/app/src/main/java/chat/simplex/app/views/chat/ChatView.kt @@ -165,7 +165,7 @@ fun ChatItemsList(chatItems: List) { ChatItemView(cItem, uriHandler) } val len = chatItems.count() - if (keyboardState != ciListState.value.keyboardState || !ciListState.value.scrolled || len != ciListState.value.itemCount) { + if (len > 1 && (keyboardState != ciListState.value.keyboardState || !ciListState.value.scrolled || len != ciListState.value.itemCount)) { scope.launch { ciListState.value = CIListState(true, len, keyboardState) listState.animateScrollToItem(len - 1)