mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 04:49:21 +00:00
Fix a bug on friends list screen
This commit is contained in:
parent
98354ee3cc
commit
2ac5caaf96
@ -37,8 +37,7 @@ class _FriendsListScreenState extends SafeState<FriendsListScreen> {
|
|||||||
_ErrorsLevel _error = _ErrorsLevel.NONE;
|
_ErrorsLevel _error = _ErrorsLevel.NONE;
|
||||||
FriendsList? _friendsList;
|
FriendsList? _friendsList;
|
||||||
late UsersList _usersInfo;
|
late UsersList _usersInfo;
|
||||||
GlobalKey<RefreshIndicatorState> _refreshIndicatorKey =
|
final _refreshIndicatorKey = GlobalKey<RefreshIndicatorState>();
|
||||||
GlobalKey<RefreshIndicatorState>();
|
|
||||||
|
|
||||||
/// Useful setters
|
/// Useful setters
|
||||||
set error(_ErrorsLevel err) => setState(() => _error = err);
|
set error(_ErrorsLevel err) => setState(() => _error = err);
|
||||||
@ -61,7 +60,10 @@ class _FriendsListScreenState extends SafeState<FriendsListScreen> {
|
|||||||
|
|
||||||
/// Refresh the list of friends
|
/// Refresh the list of friends
|
||||||
Future<void> _refreshList() async {
|
Future<void> _refreshList() async {
|
||||||
|
if (_refreshIndicatorKey.currentState != null)
|
||||||
await _refreshIndicatorKey.currentState!.show();
|
await _refreshIndicatorKey.currentState!.show();
|
||||||
|
else
|
||||||
|
await _getList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Load the list of friends
|
/// Load the list of friends
|
||||||
|
Loading…
Reference in New Issue
Block a user