mirror of https://github.com/ppy/osu
Apply workaround at two levels
This commit is contained in:
parent
3428cf6501
commit
9a4b2f0d1d
|
@ -15,15 +15,11 @@
|
|||
|
||||
namespace osu.Game.Overlays.Notifications
|
||||
{
|
||||
public class NotificationSection : FillFlowContainer
|
||||
public class NotificationSection : AlwaysUpdateFillFlowContainer<Drawable>
|
||||
{
|
||||
private OsuSpriteText titleText;
|
||||
private OsuSpriteText countText;
|
||||
|
||||
// this is required to ensure correct layout and scheduling on children.
|
||||
// the layout portion of this is being tracked as a framework issue (TODO).
|
||||
protected override bool RequiresChildrenUpdate => true;
|
||||
|
||||
private ClearAllButton clearButton;
|
||||
|
||||
private FlowContainer<Notification> notifications;
|
||||
|
@ -37,6 +33,7 @@ public class NotificationSection : FillFlowContainer
|
|||
public IEnumerable<Type> AcceptTypes;
|
||||
|
||||
private string clearText;
|
||||
|
||||
public string ClearText
|
||||
{
|
||||
get { return clearText; }
|
||||
|
@ -114,7 +111,7 @@ private void load(OsuColour colours)
|
|||
},
|
||||
},
|
||||
},
|
||||
notifications = new FillFlowContainer<Notification>
|
||||
notifications = new AlwaysUpdateFillFlowContainer<Notification>
|
||||
{
|
||||
AutoSizeAxes = Axes.Y,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
|
@ -163,4 +160,13 @@ public void MarkAllRead()
|
|||
notifications?.Children.ForEach(n => n.Read = true);
|
||||
}
|
||||
}
|
||||
|
||||
public class AlwaysUpdateFillFlowContainer<T> : FillFlowContainer<T>
|
||||
where T : Drawable
|
||||
{
|
||||
// this is required to ensure correct layout and scheduling on children.
|
||||
// the layout portion of this is being tracked as a framework issue (https://github.com/ppy/osu-framework/issues/1297).
|
||||
protected override bool RequiresChildrenUpdate => true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue