mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Refactor channel scrolling container to handle manual scrolls resiliently
This commit is contained in:
@ -207,7 +207,28 @@ namespace osu.Game.Tests.Visual.Online
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestUserScrollOverride()
|
||||
public void TestOverrideChatScrolling()
|
||||
{
|
||||
fillChat();
|
||||
|
||||
sendMessage();
|
||||
checkScrolledToBottom();
|
||||
|
||||
AddStep("Scroll to start", () => chatDisplay.ScrollContainer.ScrollToStart());
|
||||
|
||||
checkNotScrolledToBottom();
|
||||
sendMessage();
|
||||
checkNotScrolledToBottom();
|
||||
|
||||
AddStep("Scroll to bottom", () => chatDisplay.ScrollContainer.ScrollToEnd());
|
||||
|
||||
checkScrolledToBottom();
|
||||
sendMessage();
|
||||
checkScrolledToBottom();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestOverrideChatScrollingByUser()
|
||||
{
|
||||
fillChat();
|
||||
|
||||
@ -314,9 +335,9 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
}
|
||||
|
||||
protected DrawableChannel DrawableChannel => InternalChildren.OfType<DrawableChannel>().First();
|
||||
public DrawableChannel DrawableChannel => InternalChildren.OfType<DrawableChannel>().First();
|
||||
|
||||
protected UserTrackingScrollContainer ScrollContainer => (UserTrackingScrollContainer)((Container)DrawableChannel.Child).Child;
|
||||
public UserTrackingScrollContainer ScrollContainer => (UserTrackingScrollContainer)((Container)DrawableChannel.Child).Child;
|
||||
|
||||
public FillFlowContainer FillFlow => (FillFlowContainer)ScrollContainer.Child;
|
||||
|
||||
|
Reference in New Issue
Block a user