mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-24 13:59:22 +00:00
Fix refresh issue
This commit is contained in:
parent
11829273e2
commit
5040fbb101
@ -33,7 +33,7 @@ class _UserPageScreenState extends SafeState<UserPageScreen> {
|
||||
|
||||
// Objects members
|
||||
_PageStatus _status = _PageStatus.LOADING;
|
||||
late AdvancedUserInfo _userInfo;
|
||||
AdvancedUserInfo? _userInfo;
|
||||
FriendStatus? _frienshipStatus;
|
||||
final _refreshIndicatorKey = GlobalKey<RefreshIndicatorState>();
|
||||
|
||||
@ -42,6 +42,7 @@ class _UserPageScreenState extends SafeState<UserPageScreen> {
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
if(_userInfo?.id != widget.userID)
|
||||
_getUserInfo();
|
||||
}
|
||||
|
||||
@ -112,12 +113,12 @@ class _UserPageScreenState extends SafeState<UserPageScreen> {
|
||||
Widget _buildBody() {
|
||||
return isTablet(context)
|
||||
? UserPageTablet(
|
||||
userInfo: _userInfo,
|
||||
userInfo: _userInfo!,
|
||||
onNeedRefresh: () => _refreshIndicatorKey.currentState!.show(),
|
||||
friendshipStatus: _frienshipStatus,
|
||||
)
|
||||
: UserMobilePage(
|
||||
userInfo: _userInfo,
|
||||
userInfo: _userInfo!,
|
||||
onNeedRefresh: () => _refreshIndicatorKey.currentState!.show(),
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user