mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-05-25 05:12:11 +00:00
fix ui glitch
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
This commit is contained in:
parent
00cb615e56
commit
d6432677df
1 changed files with 7 additions and 1 deletions
|
|
@ -39,6 +39,7 @@ class _ChatListViewState extends State<ChatListView> {
|
|||
List<Group> _groupsArchived = [];
|
||||
|
||||
bool _hasContacts = false;
|
||||
bool _loading = true;
|
||||
bool get _hasOpenGroup => _groupsNotPinned.isNotEmpty || _groupsArchived.isNotEmpty || _groupsPinned.isNotEmpty;
|
||||
|
||||
GlobalKey searchForOtherUsers = GlobalKey();
|
||||
|
|
@ -66,6 +67,7 @@ class _ChatListViewState extends State<ChatListView> {
|
|||
_groupsNotPinned = groups.where((x) => !x.pinned && !x.archived).toList();
|
||||
_groupsPinned = groups.where((x) => x.pinned && !x.archived).toList();
|
||||
_groupsArchived = groups.where((x) => x.archived).toList();
|
||||
_loading = false;
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -218,7 +220,11 @@ class _ChatListViewState extends State<ChatListView> {
|
|||
children: [
|
||||
const FinishSetupComp(),
|
||||
const MissingBackupComp(),
|
||||
if (!_hasOpenGroup)
|
||||
if (_loading)
|
||||
const Expanded(
|
||||
child: SizedBox.shrink(),
|
||||
)
|
||||
else if (!_hasOpenGroup)
|
||||
Expanded(
|
||||
child: ListView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue