fix: Update viewable_profile_screen to handle void return from followUser
This commit is contained in:
parent
00b4705a00
commit
2b3704a3f9
|
|
@ -477,13 +477,13 @@ class _UnifiedProfileScreenState extends ConsumerState<UnifiedProfileScreen>
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
final status = await apiService.followUser(_profile!.id);
|
await apiService.followUser(_profile!.id);
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
setState(() {
|
setState(() {
|
||||||
_followStatus = status;
|
_followStatus = 'accepted';
|
||||||
_isFollowing = status == 'accepted';
|
_isFollowing = true;
|
||||||
_isFriend = _isFollowing && _isFollowedBy;
|
_isFriend = _isFollowing && _isFollowedBy;
|
||||||
if (_stats != null && _isFollowing) {
|
if (_stats != null) {
|
||||||
_stats = ProfileStats(
|
_stats = ProfileStats(
|
||||||
posts: _stats!.posts,
|
posts: _stats!.posts,
|
||||||
followers: _stats!.followers + 1,
|
followers: _stats!.followers + 1,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue