1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 19:22:56 +08:00

Schedule action buttons visibility changes

This commit is contained in:
ansel 2022-10-08 17:15:10 +03:00
parent abf56c27a1
commit 4e7c30504f

View File

@ -352,9 +352,9 @@ namespace osu.Game.Overlays.Comments
};
}
/**
* Invokes comment deletion with confirmation.
*/
/// <summary>
/// Invokes comment deletion with confirmation.
/// </summary>
private void deleteComment()
{
if (dialogOverlay == null)
@ -363,27 +363,27 @@ namespace osu.Game.Overlays.Comments
dialogOverlay.Push(new ConfirmDialog("Do you really want to delete your comment?", deleteCommentRequest));
}
/**
* Invokes comment deletion directly.
*/
/// <summary>
/// Invokes comment deletion directly.
/// </summary>
private void deleteCommentRequest()
{
actionsContainer.Hide();
actionsLoading.Show();
var request = new CommentDeleteRequest(Comment.Id);
request.Success += _ =>
request.Success += _ => Schedule(() =>
{
actionsLoading.Hide();
AutoSizeAxes = Axes.None;
Masking = true;
this.ResizeHeightTo(0, 1000, Easing.Out);
this.FadeOut(1000, Easing.Out).Expire();
};
request.Failure += _ =>
});
request.Failure += _ => Schedule(() =>
{
actionsLoading.Hide();
actionsContainer.Show();
};
});
api.Queue(request);
}