mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 06:42:56 +08:00
Schedule action buttons visibility changes
This commit is contained in:
parent
abf56c27a1
commit
4e7c30504f
@ -352,9 +352,9 @@ namespace osu.Game.Overlays.Comments
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/// <summary>
|
||||||
* Invokes comment deletion with confirmation.
|
/// Invokes comment deletion with confirmation.
|
||||||
*/
|
/// </summary>
|
||||||
private void deleteComment()
|
private void deleteComment()
|
||||||
{
|
{
|
||||||
if (dialogOverlay == null)
|
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));
|
dialogOverlay.Push(new ConfirmDialog("Do you really want to delete your comment?", deleteCommentRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/// <summary>
|
||||||
* Invokes comment deletion directly.
|
/// Invokes comment deletion directly.
|
||||||
*/
|
/// </summary>
|
||||||
private void deleteCommentRequest()
|
private void deleteCommentRequest()
|
||||||
{
|
{
|
||||||
actionsContainer.Hide();
|
actionsContainer.Hide();
|
||||||
actionsLoading.Show();
|
actionsLoading.Show();
|
||||||
var request = new CommentDeleteRequest(Comment.Id);
|
var request = new CommentDeleteRequest(Comment.Id);
|
||||||
request.Success += _ =>
|
request.Success += _ => Schedule(() =>
|
||||||
{
|
{
|
||||||
actionsLoading.Hide();
|
actionsLoading.Hide();
|
||||||
AutoSizeAxes = Axes.None;
|
AutoSizeAxes = Axes.None;
|
||||||
Masking = true;
|
Masking = true;
|
||||||
this.ResizeHeightTo(0, 1000, Easing.Out);
|
this.ResizeHeightTo(0, 1000, Easing.Out);
|
||||||
this.FadeOut(1000, Easing.Out).Expire();
|
this.FadeOut(1000, Easing.Out).Expire();
|
||||||
};
|
});
|
||||||
request.Failure += _ =>
|
request.Failure += _ => Schedule(() =>
|
||||||
{
|
{
|
||||||
actionsLoading.Hide();
|
actionsLoading.Hide();
|
||||||
actionsContainer.Show();
|
actionsContainer.Show();
|
||||||
};
|
});
|
||||||
api.Queue(request);
|
api.Queue(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user