1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 04:49:21 +00:00

Fix potential load issue on user page

This commit is contained in:
Pierre HUBERT 2022-03-12 15:22:14 +01:00
parent 73f20a543d
commit 512b058d34

View File

@ -20,8 +20,7 @@ enum _PageStatus { LOADING, ERROR, READY }
class UserPageScreen extends StatefulWidget { class UserPageScreen extends StatefulWidget {
final int userID; final int userID;
const UserPageScreen({Key? key, required this.userID}) const UserPageScreen({Key? key, required this.userID}) : super(key: key);
: super(key: key);
@override @override
_UserPageScreenState createState() => _UserPageScreenState(); _UserPageScreenState createState() => _UserPageScreenState();
@ -42,7 +41,7 @@ class _UserPageScreenState extends SafeState<UserPageScreen> {
@override @override
void didChangeDependencies() { void didChangeDependencies() {
super.didChangeDependencies(); super.didChangeDependencies();
if(_userInfo?.id != widget.userID) if (_userInfo?.id == widget.userID) return;
_getUserInfo(); _getUserInfo();
} }