From f299de891c2264cfbd4cdd9521ab1f420cf475c9 Mon Sep 17 00:00:00 2001 From: HuanCheng65 <22636177+HuanCheng65@users.noreply.github.com> Date: Fri, 21 Jul 2023 22:23:25 +0800 Subject: [PATCH] =?UTF-8?q?pref:=20=E8=8D=89=E7=A8=BF=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/huanchengfly/tieba/post/ui/page/reply/ReplyPage.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/huanchengfly/tieba/post/ui/page/reply/ReplyPage.kt b/app/src/main/java/com/huanchengfly/tieba/post/ui/page/reply/ReplyPage.kt index 04d43c66..9bc57e8c 100644 --- a/app/src/main/java/com/huanchengfly/tieba/post/ui/page/reply/ReplyPage.kt +++ b/app/src/main/java/com/huanchengfly/tieba/post/ui/page/reply/ReplyPage.kt @@ -116,9 +116,9 @@ import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf import kotlinx.coroutines.FlowPreview import kotlinx.coroutines.flow.MutableStateFlow -import kotlinx.coroutines.flow.debounce import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.filter +import kotlinx.coroutines.flow.sample import kotlinx.coroutines.launch import org.litepal.LitePal import org.litepal.extension.deleteAllAsync @@ -210,7 +210,7 @@ fun ReplyPage( val curText by curTextFlow.collectAsState() LaunchedEffect(Unit) { curTextFlow - .debounce(500) + .sample(500) .distinctUntilChanged() .collect { Log.i("ReplyPage", "collect: $it")