Refactor message highlighting logic to rely on a Channel data bindable

This commit is contained in:
Salman Ahmed
2022-03-08 03:19:35 +03:00
parent 5764c53c17
commit 7f47be4680
4 changed files with 63 additions and 80 deletions

View File

@ -9,6 +9,7 @@ using Newtonsoft.Json;
using osu.Framework.Bindables;
using osu.Framework.Lists;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Overlays.Chat;
namespace osu.Game.Online.Chat
{
@ -89,6 +90,12 @@ namespace osu.Game.Online.Chat
/// </summary>
public Bindable<bool> Joined = new Bindable<bool>();
/// <summary>
/// Signals if there is a message to highlight.
/// This is automatically cleared by the associated <see cref="DrawableChannel"/> after highlighting.
/// </summary>
public Bindable<Message> HighlightedMessage = new Bindable<Message>();
[JsonConstructor]
public Channel()
{