mirror of https://github.com/ppy/osu
Merge branch 'master' into fix-fade-discrepancies
This commit is contained in:
commit
1981b94e32
|
@ -6,7 +6,7 @@
|
|||
|
||||
namespace osu.Game.Online.Chat
|
||||
{
|
||||
public class InfoMessage : Message
|
||||
public class InfoMessage : LocalMessage
|
||||
{
|
||||
private static int infoID = -1;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
namespace osu.Game.Online.Chat
|
||||
{
|
||||
public class LocalEchoMessage : Message
|
||||
public class LocalEchoMessage : LocalMessage
|
||||
{
|
||||
public LocalEchoMessage() : base(null)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -85,7 +85,7 @@ private void newMessagesArrived(IEnumerable<Message> newMessages)
|
|||
|
||||
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();
|
||||
|
|
Loading…
Reference in New Issue