Add test for scroll to end when max history is exceeded

This commit is contained in:
Dean Herbert
2019-10-29 14:32:38 +09:00
parent 34aa0b14a4
commit d1c6e3f620
3 changed files with 38 additions and 11 deletions

View File

@ -1,4 +1,4 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
@ -107,7 +107,7 @@ namespace osu.Game.Overlays.Chat
scrollToEnd();
var staleMessages = chatLines.Where(c => c.LifetimeEnd == double.MaxValue).ToArray();
int count = staleMessages.Length - Channel.MaxHistory;
int count = staleMessages.Length - Channel.MAX_HISTORY;
for (int i = 0; i < count; i++)
{