mirror of
https://github.com/ppy/osu
synced 2025-01-23 22:33:05 +00:00
Fix notification text sets overwriting each other
This commit is contained in:
parent
cdb5fea513
commit
ed9039f60f
@ -52,14 +52,6 @@ namespace osu.Game.Database
|
|||||||
realmSubscription = realm.RegisterForNotifications(
|
realmSubscription = realm.RegisterForNotifications(
|
||||||
realm => realm.All<BeatmapSetInfo>().Where(s => !s.DeletePending), beatmapsChanged);
|
realm => realm.All<BeatmapSetInfo>().Where(s => !s.DeletePending), beatmapsChanged);
|
||||||
|
|
||||||
realm.Run(r =>
|
|
||||||
{
|
|
||||||
if (r.All<BeatmapSetInfo>().Any(s => !s.DeletePending && s.OnlineID == beatmapSetInfo.OnlineID))
|
|
||||||
{
|
|
||||||
Text = NotificationsStrings.MismatchingBeatmapForReplay;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
autoDownloadConfig = config.GetBindable<bool>(OsuSetting.AutomaticallyDownloadMissingBeatmaps);
|
autoDownloadConfig = config.GetBindable<bool>(OsuSetting.AutomaticallyDownloadMissingBeatmaps);
|
||||||
noVideoSetting = config.GetBindable<bool>(OsuSetting.PreferNoVideo);
|
noVideoSetting = config.GetBindable<bool>(OsuSetting.PreferNoVideo);
|
||||||
|
|
||||||
@ -71,9 +63,15 @@ namespace osu.Game.Database
|
|||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
if (autoDownloadConfig.Value)
|
if (autoDownloadConfig.Value)
|
||||||
|
{
|
||||||
|
Text = NotificationsStrings.DownloadingBeatmapForReplay;
|
||||||
beatmapDownloader.Download(beatmapSetInfo, noVideoSetting.Value);
|
beatmapDownloader.Download(beatmapSetInfo, noVideoSetting.Value);
|
||||||
|
}
|
||||||
Text = autoDownloadConfig.Value ? NotificationsStrings.DownloadingBeatmapForReplay : NotificationsStrings.MissingBeatmapForReplay;
|
else
|
||||||
|
{
|
||||||
|
bool missingSetMatchesExistingOnlineId = realm.Run(r => r.All<BeatmapSetInfo>().Any(s => !s.DeletePending && s.OnlineID == beatmapSetInfo.OnlineID));
|
||||||
|
Text = missingSetMatchesExistingOnlineId ? NotificationsStrings.MismatchingBeatmapForReplay : NotificationsStrings.MissingBeatmapForReplay;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
|
Loading…
Reference in New Issue
Block a user