fix ui glitch
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run

This commit is contained in:
otsmr 2026-05-21 14:30:26 +02:00
parent 00cb615e56
commit d6432677df

View file

@ -39,6 +39,7 @@ class _ChatListViewState extends State<ChatListView> {
List<Group> _groupsArchived = []; List<Group> _groupsArchived = [];
bool _hasContacts = false; bool _hasContacts = false;
bool _loading = true;
bool get _hasOpenGroup => _groupsNotPinned.isNotEmpty || _groupsArchived.isNotEmpty || _groupsPinned.isNotEmpty; bool get _hasOpenGroup => _groupsNotPinned.isNotEmpty || _groupsArchived.isNotEmpty || _groupsPinned.isNotEmpty;
GlobalKey searchForOtherUsers = GlobalKey(); GlobalKey searchForOtherUsers = GlobalKey();
@ -66,6 +67,7 @@ class _ChatListViewState extends State<ChatListView> {
_groupsNotPinned = groups.where((x) => !x.pinned && !x.archived).toList(); _groupsNotPinned = groups.where((x) => !x.pinned && !x.archived).toList();
_groupsPinned = groups.where((x) => x.pinned && !x.archived).toList(); _groupsPinned = groups.where((x) => x.pinned && !x.archived).toList();
_groupsArchived = groups.where((x) => x.archived).toList(); _groupsArchived = groups.where((x) => x.archived).toList();
_loading = false;
}); });
}); });
@ -218,7 +220,11 @@ class _ChatListViewState extends State<ChatListView> {
children: [ children: [
const FinishSetupComp(), const FinishSetupComp(),
const MissingBackupComp(), const MissingBackupComp(),
if (!_hasOpenGroup) if (_loading)
const Expanded(
child: SizedBox.shrink(),
)
else if (!_hasOpenGroup)
Expanded( Expanded(
child: ListView( child: ListView(
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),