Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@bdach
Copy link
Collaborator

@bdach bdach commented Oct 23, 2025

RFC. Soft prereq for #34494.

This is something I've asked to be done for a long time. Relevant because I've complained about APIAccess getting bloated with every addition of a new piece of user-local state: friends, blocks, and now favourite beatmaps.

LocalUser is left mostly unchanged due to sheer number of usages, but Friends / Blocks get the full treatment.

It's just so messy managing all this inside APIAccess next to everything else, IMO.

dfa8d4f (a bug on master, albeit of little consequence) demonstrates why I want this change.

bdach added 2 commits October 23, 2025 10:53
…onent

Something I've asked to be done for a long time. Relevant because I've
complained about this on every addition of a new piece of user-local
state: friends, blocks, and now favourite beatmaps.

It's just so messy managing all this inside `APIAccess` next to
everything else, IMO.
See, this refactor is where omissions like this that normally would pass
unnoticed stop passing unnoticed.
@bdach bdach self-assigned this Oct 23, 2025
@bdach bdach added code quality Fixes code quality. Not visible to the end user. area:online functionality Deals with online fetching / sending but don't change much on a surface UI level. labels Oct 23, 2025
@peppy peppy self-requested a review October 24, 2025 05:29
configStatus.Value = UserStatus.Online;

// Scheduled prior to state change such that the state changed event is invoked with the correct user and their friends present
Schedule(() =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These schedules could be in a slightly different order for some operations where operations are now split across APIAccess and LocalUserState, but on a quick check I can't see this going wrong.

Copy link
Member

@peppy peppy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@peppy peppy merged commit 646cb71 into ppy:master Oct 24, 2025
7 of 9 checks passed
@github-project-automation github-project-automation bot moved this from Next up to Done in @peppy's untitled project Oct 24, 2025
@bdach bdach deleted the local-user-state-refactor branch October 24, 2025 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:online functionality Deals with online fetching / sending but don't change much on a surface UI level. code quality Fixes code quality. Not visible to the end user. size/L

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants