mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 04:49:21 +00:00
Improved loading bar
This commit is contained in:
parent
21a60f423b
commit
a80ccb0a9f
@ -96,31 +96,43 @@ class _FriendsListScreenState extends SafeState<FriendsListScreen> {
|
||||
if (_error == _ErrorsLevel.MAJOR) return _buildError();
|
||||
if (_friendsList == null) return buildCenteredProgressBar();
|
||||
|
||||
return Column(
|
||||
return Stack(
|
||||
children: <Widget>[
|
||||
// Check for errors
|
||||
Container(child: _error != _ErrorsLevel.NONE ? _buildError() : null),
|
||||
Column(
|
||||
children: <Widget>[
|
||||
// Check for errors
|
||||
Container(
|
||||
child: _error != _ErrorsLevel.NONE ? _buildError() : null),
|
||||
|
||||
// List of friends
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
itemCount: _friendsList.length,
|
||||
itemBuilder: (c, i) => _friendsList[i].accepted
|
||||
? AcceptedFriendTile(
|
||||
friend: _friendsList[i],
|
||||
user: _usersInfo.getUser(_friendsList[i].id),
|
||||
onOpenPrivateConversation: _openPrivateConversation,
|
||||
onSetFollowing: _setFollowingFriend,
|
||||
onRequestDelete: _deleteFriend,
|
||||
)
|
||||
: PendingFriendTile(
|
||||
friend: _friendsList[i],
|
||||
user: _usersInfo.getUser(_friendsList[i].id),
|
||||
onRespond: _respondRequest,
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
// Check if loading
|
||||
Container(child: _loading ? CircularProgressIndicator() : null),
|
||||
|
||||
// List of friends
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
itemCount: _friendsList.length,
|
||||
itemBuilder: (c, i) => _friendsList[i].accepted
|
||||
? AcceptedFriendTile(
|
||||
friend: _friendsList[i],
|
||||
user: _usersInfo.getUser(_friendsList[i].id),
|
||||
onOpenPrivateConversation: _openPrivateConversation,
|
||||
onSetFollowing: _setFollowingFriend,
|
||||
onRequestDelete: _deleteFriend,
|
||||
)
|
||||
: PendingFriendTile(
|
||||
friend: _friendsList[i],
|
||||
user: _usersInfo.getUser(_friendsList[i].id),
|
||||
onRespond: _respondRequest,
|
||||
)),
|
||||
Positioned(
|
||||
child: Container(
|
||||
child:
|
||||
_loading ? Center(child: CircularProgressIndicator()) : null),
|
||||
top: 16.0,
|
||||
left: 0.0,
|
||||
right: 0.0,
|
||||
),
|
||||
],
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user