mirror of
https://github.com/ppy/osu.git
synced 2026-06-06 02:53:40 +08:00
Ensure startup imports trigger notifications
This commit is contained in:
+13
-7
@@ -211,13 +211,6 @@ namespace osu.Game
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
if (args?.Length > 0)
|
|
||||||
{
|
|
||||||
var paths = args.Where(a => !a.StartsWith('-')).ToArray();
|
|
||||||
if (paths.Length > 0)
|
|
||||||
Task.Run(() => Import(paths));
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies.CacheAs(this);
|
dependencies.CacheAs(this);
|
||||||
|
|
||||||
dependencies.Cache(SentryLogger);
|
dependencies.Cache(SentryLogger);
|
||||||
@@ -867,6 +860,19 @@ namespace osu.Game
|
|||||||
{
|
{
|
||||||
if (mode.NewValue != OverlayActivation.All) CloseAllOverlays();
|
if (mode.NewValue != OverlayActivation.All) CloseAllOverlays();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Importantly, this should be run after binding PostNotification to the import handlers so they can present the import after game startup.
|
||||||
|
handleStartupImport();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleStartupImport()
|
||||||
|
{
|
||||||
|
if (args?.Length > 0)
|
||||||
|
{
|
||||||
|
var paths = args.Where(a => !a.StartsWith('-')).ToArray();
|
||||||
|
if (paths.Length > 0)
|
||||||
|
Task.Run(() => Import(paths));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showOverlayAboveOthers(OverlayContainer overlay, OverlayContainer[] otherOverlays)
|
private void showOverlayAboveOthers(OverlayContainer overlay, OverlayContainer[] otherOverlays)
|
||||||
|
|||||||
Reference in New Issue
Block a user