mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-12-25 04:18:51 +00:00
Fix potential load issue on user page
This commit is contained in:
parent
73f20a543d
commit
512b058d34
@ -20,8 +20,7 @@ enum _PageStatus { LOADING, ERROR, READY }
|
||||
class UserPageScreen extends StatefulWidget {
|
||||
final int userID;
|
||||
|
||||
const UserPageScreen({Key? key, required this.userID})
|
||||
: super(key: key);
|
||||
const UserPageScreen({Key? key, required this.userID}) : super(key: key);
|
||||
|
||||
@override
|
||||
_UserPageScreenState createState() => _UserPageScreenState();
|
||||
@ -33,7 +32,7 @@ class _UserPageScreenState extends SafeState<UserPageScreen> {
|
||||
|
||||
// Objects members
|
||||
_PageStatus _status = _PageStatus.LOADING;
|
||||
AdvancedUserInfo? _userInfo;
|
||||
AdvancedUserInfo? _userInfo;
|
||||
FriendStatus? _frienshipStatus;
|
||||
final _refreshIndicatorKey = GlobalKey<RefreshIndicatorState>();
|
||||
|
||||
@ -42,7 +41,7 @@ class _UserPageScreenState extends SafeState<UserPageScreen> {
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
if(_userInfo?.id != widget.userID)
|
||||
if (_userInfo?.id == widget.userID) return;
|
||||
_getUserInfo();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user