1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 08:52:55 +08:00

Change default to being important

This commit is contained in:
Dean Herbert 2018-07-16 13:00:21 +09:00
parent 81e5a37d6d
commit a12c47536b
6 changed files with 20 additions and 18 deletions

View File

@ -111,8 +111,6 @@ namespace osu.Desktop.Overlays
private class UpdateCompleteNotification : SimpleNotification
{
public override bool IsImportant => true;
public UpdateCompleteNotification(string version, Action<string> openUrl = null)
{
Text = $"You are now running osu!lazer {version}.\nClick to see what's new!";

View File

@ -48,7 +48,7 @@ namespace osu.Desktop.Updater
if (latest.TagName != version)
{
notificationOverlay.Post(new UpdateNotification
notificationOverlay.Post(new SimpleNotification
{
Text = $"A newer release of osu! has been found ({version} → {latest.TagName}).\n\n"
+ "Click here to download the new version, which can be installed over the top of your existing installation",
@ -62,11 +62,6 @@ namespace osu.Desktop.Updater
}
}
private class UpdateNotification : SimpleNotification
{
public override bool IsImportant => true;
}
private string getBestUrl(GitHubRelease release)
{
GitHubAsset bestAsset = null;

View File

@ -143,7 +143,7 @@ namespace osu.Game.Beatmaps
return;
}
var downloadNotification = new ProgressNotification
var downloadNotification = new DownloadNotification
{
CompletionText = $"Imported {beatmapSetInfo.Metadata.Artist} - {beatmapSetInfo.Metadata.Title}!",
Text = $"Downloading {beatmapSetInfo.Metadata.Artist} - {beatmapSetInfo.Metadata.Title}",
@ -453,5 +453,21 @@ namespace osu.Game.Beatmaps
protected override Texture GetBackground() => null;
protected override Track GetTrack() => null;
}
private class DownloadNotification : ProgressNotification
{
public override bool IsImportant => false;
protected override Notification CreateCompletionNotification() => new SilencedProgressCompletionNotification
{
Activated = CompletionClickAction,
Text = CompletionText
};
private class SilencedProgressCompletionNotification : ProgressCompletionNotification
{
public override bool IsImportant => false;
}
}
}
}

View File

@ -116,7 +116,7 @@ namespace osu.Game.Database
/// <param name="paths">One or more archive locations on disk.</param>
public void Import(params string[] paths)
{
var notification = new ImportNotification
var notification = new ProgressNotification
{
Text = "Import is initialising...",
Progress = 0,
@ -407,10 +407,5 @@ namespace osu.Game.Database
return new LegacyFilesystemReader(path);
throw new InvalidFormatException($"{path} is not a valid archive");
}
private class ImportNotification : ProgressNotification
{
public override bool IsImportant => true;
}
}
}

View File

@ -26,7 +26,7 @@ namespace osu.Game.Overlays.Notifications
/// <summary>
/// Whether this notification should forcefully display itself.
/// </summary>
public virtual bool IsImportant => false;
public virtual bool IsImportant => true;
/// <summary>
/// Run on user activating the notification. Return true to close.

View File

@ -9,8 +9,6 @@ namespace osu.Game.Overlays.Notifications
{
public class ProgressCompletionNotification : SimpleNotification
{
public override bool IsImportant => true;
public ProgressCompletionNotification()
{
Icon = FontAwesome.fa_check;