Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for displaying "system title" on main menu #26172

Merged
merged 12 commits into from
Dec 28, 2023

Conversation

bdach
Copy link
Collaborator

@bdach bdach commented Dec 27, 2023

Name will not tell readers much, but the example screenshot below should.

osu_2023-12-27_23-29-31

@bdach bdach force-pushed the system-title-basic branch from d40290d to a3f720b Compare December 27, 2023 22:37
public class GetSystemTitleRequest : OsuJsonWebRequest<APISystemTitle>
{
public GetSystemTitleRequest()
: base(@"https://assets.ppy.sh/lazer-status.json")
Copy link
Collaborator Author

@bdach bdach Dec 27, 2023

Choose a reason for hiding this comment

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

Astute readers will inevitably point out that this (a) doesn't exist yet, (b) is not an API call.

I agreed upon doing this in this way with @peppy beforehand. Can be tested via e.g. python3 -m http.server or something (and changing URL, and probably also allowing insecure requests).

Current.BindValueChanged(_ => loadNewImage(), true);

checkForUpdates();
Scheduler.AddDelayed(checkForUpdates, TimeSpan.FromMinutes(15).TotalMilliseconds, true);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure if this polling is necessary. Probably can be removed if just a once-off call at startup is deemed acceptable.

Copy link
Member

Choose a reason for hiding this comment

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

Refreshing is best. It will already only attempt a refresh when returning to the main menu, which should be pretty fine. I'd almost say to just check each time we return, but I guess a bit of delay is worth having.

Comment on lines +999 to +1000
dependencies.Cache(versionManager = new VersionManager { Depth = int.MinValue });
loadComponentSingleFile(versionManager, ScreenContainer.Add);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This excursion is to prevent the version display on the bottom and the system title stepping on each other.

@bdach bdach force-pushed the system-title-basic branch from be14d8b to ef39759 Compare December 27, 2023 23:18
@peppy peppy force-pushed the system-title-basic branch from 6ccd5d9 to 6684987 Compare December 28, 2023 06:19
@peppy peppy marked this pull request as ready for review December 28, 2023 06:19
@peppy peppy enabled auto-merge December 28, 2023 06:19
@peppy peppy disabled auto-merge December 28, 2023 07:05
@peppy peppy merged commit 3a3b4d4 into ppy:master Dec 28, 2023
@bdach bdach deleted the system-title-basic branch December 28, 2023 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants