1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 08:43:01 +08:00

Merge branch 'master' into fix-fade-discrepancies

This commit is contained in:
Dan Balasescu 2018-08-04 00:21:48 +09:00 committed by GitHub
commit 1981b94e32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 3 deletions

View File

@ -6,7 +6,7 @@ using osu.Game.Users;
namespace osu.Game.Online.Chat
{
public class InfoMessage : Message
public class InfoMessage : LocalMessage
{
private static int infoID = -1;

View File

@ -3,7 +3,7 @@
namespace osu.Game.Online.Chat
{
public class LocalEchoMessage : Message
public class LocalEchoMessage : LocalMessage
{
public LocalEchoMessage() : base(null)
{

View File

@ -0,0 +1,16 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
namespace osu.Game.Online.Chat
{
/// <summary>
/// A message which is generated and displayed locally.
/// </summary>
public class LocalMessage : Message
{
protected LocalMessage(long? id)
: base(id)
{
}
}
}

View File

@ -85,7 +85,7 @@ namespace osu.Game.Overlays.Chat
if (!IsLoaded) return;
if (scroll.IsScrolledToEnd(10) || !flow.Children.Any())
if (scroll.IsScrolledToEnd(10) || !flow.Children.Any() || newMessages.Any(m => m is LocalMessage))
scrollToEnd();
var staleMessages = flow.Children.Where(c => c.LifetimeEnd == double.MaxValue).ToArray();