mirror of
https://github.com/ppy/osu.git
synced 2024-12-18 00:42:55 +08:00
Don't show the migrate button on deployed builds for now
This commit is contained in:
parent
b0684cb194
commit
fcfdbc8e07
@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
protected override string Header => "General";
|
protected override string Header => "General";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(BeatmapManager beatmaps)
|
private void load(OsuGameBase osuGame, BeatmapManager beatmaps)
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -55,8 +55,12 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
beatmaps.Restore(b);
|
beatmaps.Restore(b);
|
||||||
}).ContinueWith(t => Schedule(() => restoreButton.Enabled.Value = true));
|
}).ContinueWith(t => Schedule(() => restoreButton.Enabled.Value = true));
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
migrateButton = new SettingsButton
|
};
|
||||||
|
|
||||||
|
if (!osuGame.IsDeployedBuild)
|
||||||
|
{
|
||||||
|
Add(migrateButton = new SettingsButton
|
||||||
{
|
{
|
||||||
Text = "Migrate all beatmaps to the new format",
|
Text = "Migrate all beatmaps to the new format",
|
||||||
Action = () =>
|
Action = () =>
|
||||||
@ -64,8 +68,8 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
migrateButton.Enabled.Value = false;
|
migrateButton.Enabled.Value = false;
|
||||||
Task.Factory.StartNew(beatmaps.MigrateAllToNewFormat).ContinueWith(t => Schedule(() => migrateButton.Enabled.Value = true), TaskContinuationOptions.LongRunning);
|
Task.Factory.StartNew(beatmaps.MigrateAllToNewFormat).ContinueWith(t => Schedule(() => migrateButton.Enabled.Value = true), TaskContinuationOptions.LongRunning);
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user