Skip to content

Commit

Permalink
chore: Follow up design fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
krille-chan committed Dec 24, 2023
1 parent 709e8c6 commit 5f10b88
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/pages/chat/chat.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -1216,11 +1222,6 @@ class ChatController extends State<ChatPageWithRoom> {
);
}
}
if (_inputTextIsEmpty != text.isEmpty) {
setState(() {
_inputTextIsEmpty = text.isEmpty;
});
}
}

bool _inputTextIsEmpty = true;
Expand Down
2 changes: 2 additions & 0 deletions lib/pages/chat_list/space_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ class _SpaceViewState extends State<SpaceView> {
slivers: [
ChatListHeader(controller: widget.controller),
SliverAppBar(
automaticallyImplyLeading: false,
primary: false,
titleSpacing: 0,
title: ListTile(
leading: BackButton(
Expand Down

0 comments on commit 5f10b88

Please sign in to comment.