mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 12:59: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 (_error == _ErrorsLevel.MAJOR) return _buildError();
|
||||||
if (_friendsList == null) return buildCenteredProgressBar();
|
if (_friendsList == null) return buildCenteredProgressBar();
|
||||||
|
|
||||||
return Column(
|
return Stack(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
// Check for errors
|
Column(
|
||||||
Container(child: _error != _ErrorsLevel.NONE ? _buildError() : null),
|
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
|
// Check if loading
|
||||||
Container(child: _loading ? CircularProgressIndicator() : null),
|
Positioned(
|
||||||
|
child: Container(
|
||||||
// List of friends
|
child:
|
||||||
Expanded(
|
_loading ? Center(child: CircularProgressIndicator()) : null),
|
||||||
child: ListView.builder(
|
top: 16.0,
|
||||||
itemCount: _friendsList.length,
|
left: 0.0,
|
||||||
itemBuilder: (c, i) => _friendsList[i].accepted
|
right: 0.0,
|
||||||
? 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,
|
|
||||||
)),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user