mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 09:47:52 +08:00
Allow Delete and Undelete operations to run silently when needed
This commit is contained in:
parent
c8f9354327
commit
6ebd13c733
@ -385,7 +385,7 @@ namespace osu.Game.Database
|
||||
/// Delete multiple items.
|
||||
/// This will post notifications tracking progress.
|
||||
/// </summary>
|
||||
public void Delete(List<TModel> items)
|
||||
public void Delete(List<TModel> items, bool silent = false)
|
||||
{
|
||||
if (items.Count == 0) return;
|
||||
|
||||
@ -396,7 +396,8 @@ namespace osu.Game.Database
|
||||
State = ProgressNotificationState.Active,
|
||||
};
|
||||
|
||||
PostNotification?.Invoke(notification);
|
||||
if (!silent)
|
||||
PostNotification?.Invoke(notification);
|
||||
|
||||
int i = 0;
|
||||
|
||||
@ -423,7 +424,7 @@ namespace osu.Game.Database
|
||||
/// Restore multiple items that were previously deleted.
|
||||
/// This will post notifications tracking progress.
|
||||
/// </summary>
|
||||
public void Undelete(List<TModel> items)
|
||||
public void Undelete(List<TModel> items, bool silent = false)
|
||||
{
|
||||
if (!items.Any()) return;
|
||||
|
||||
@ -434,7 +435,8 @@ namespace osu.Game.Database
|
||||
State = ProgressNotificationState.Active,
|
||||
};
|
||||
|
||||
PostNotification?.Invoke(notification);
|
||||
if (!silent)
|
||||
PostNotification?.Invoke(notification);
|
||||
|
||||
int i = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user