mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 05:32:54 +08: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(
|
||||
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);
|
||||
noVideoSetting = config.GetBindable<bool>(OsuSetting.PreferNoVideo);
|
||||
|
||||
@ -71,9 +63,15 @@ namespace osu.Game.Database
|
||||
base.LoadComplete();
|
||||
|
||||
if (autoDownloadConfig.Value)
|
||||
{
|
||||
Text = NotificationsStrings.DownloadingBeatmapForReplay;
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user