From 0087270b7e8502ed72edbfe110241f22f1b283b1 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 5 Nov 2024 14:53:54 +0900 Subject: [PATCH] Update status and count immediately after friend request completes --- .../Overlays/Profile/Header/Components/FollowersButton.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/Profile/Header/Components/FollowersButton.cs b/osu.Game/Overlays/Profile/Header/Components/FollowersButton.cs index 39e853d2c8..69cb5684fa 100644 --- a/osu.Game/Overlays/Profile/Header/Components/FollowersButton.cs +++ b/osu.Game/Overlays/Profile/Header/Components/FollowersButton.cs @@ -95,10 +95,12 @@ namespace osu.Game.Overlays.Profile.Header.Components req.Success += () => { - followerCount += status.Value == FriendStatus.None ? 1 : -1; + bool becameFriend = status.Value == FriendStatus.None; + + SetValue(followerCount += becameFriend ? 1 : -1); + status.Value = becameFriend ? FriendStatus.NotMutual : FriendStatus.None; api.UpdateLocalFriends(); - updateStatus(); HideLoadingLayer(); };