From 7ec349b980bf17185e1f40c8481893cc3c927ed6 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sun, 4 Oct 2020 17:39:49 +0200 Subject: [PATCH] fix: TextField --- lib/views/chat.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/views/chat.dart b/lib/views/chat.dart index 0f25fc4..1bd701b 100644 --- a/lib/views/chat.dart +++ b/lib/views/chat.dart @@ -134,7 +134,6 @@ class _ChatState extends State<_Chat> { @override void initState() { _scrollController.addListener(_updateScrollController); - super.initState(); } @@ -997,7 +996,10 @@ class _ChatState extends State<_Chat> { timeout: Duration(seconds: 30) .inMilliseconds); } - setState(() => inputText = text); + // Workaround for a current desktop bug + if (!PlatformInfos.isBetaDesktop) { + setState(() => inputText = text); + } }, ), ), @@ -1012,7 +1014,8 @@ class _ChatState extends State<_Chat> { voiceMessageAction(context), ), ), - if (kIsWeb || inputText.isNotEmpty) + if (!PlatformInfos.isMobile || + inputText.isNotEmpty) Container( height: 56, alignment: Alignment.center,