chore: Follow up design fixes

This commit is contained in:
krille-chan 2023-12-24 08:14:13 +01:00
commit 050d2a2fae
No known key found for this signature in database
2 changed files with 19 additions and 11 deletions

View file

@ -1178,6 +1178,12 @@ class ChatController extends State<ChatPageWithRoom> {
static const Duration _storeInputTimeout = Duration(milliseconds: 500);
void onInputBarChanged(String text) {
if (_inputTextIsEmpty != text.isEmpty) {
setState(() {
_inputTextIsEmpty = text.isEmpty;
});
}
_storeInputTimeoutTimer?.cancel();
_storeInputTimeoutTimer = Timer(_storeInputTimeout, () async {
final prefs = await SharedPreferences.getInstance();
@ -1216,11 +1222,6 @@ class ChatController extends State<ChatPageWithRoom> {
);
}
}
if (_inputTextIsEmpty != text.isEmpty) {
setState(() {
_inputTextIsEmpty = text.isEmpty;
});
}
}
bool _inputTextIsEmpty = true;