mirror of
https://github.com/ppy/osu.git
synced 2025-03-16 05:37:19 +08:00
Rename UserChannel to private channel.
This commit is contained in:
parent
9bc225e14b
commit
42df0c974f
@ -200,17 +200,17 @@ namespace osu.Game.Online.Chat
|
||||
|
||||
private void handleUserMessages(IEnumerable<Message> messages)
|
||||
{
|
||||
var joinedUserChannels = JoinedChannels.Where(c => c.Target == TargetType.User).ToList();
|
||||
var joinedPrivateChannels = JoinedChannels.Where(c => c.Target == TargetType.User).ToList();
|
||||
|
||||
Channel getChannelForUser(User user)
|
||||
{
|
||||
var channel = joinedUserChannels.FirstOrDefault(c => c.Id == user.Id);
|
||||
var channel = joinedPrivateChannels.FirstOrDefault(c => c.Id == user.Id);
|
||||
|
||||
if (channel == null)
|
||||
{
|
||||
channel = new PrivateChannel { User = user };
|
||||
JoinedChannels.Add(channel);
|
||||
joinedUserChannels.Add(channel);
|
||||
joinedPrivateChannels.Add(channel);
|
||||
}
|
||||
|
||||
return channel;
|
||||
@ -237,7 +237,7 @@ namespace osu.Game.Online.Chat
|
||||
// Because of the way the API provides data right now, outgoing messages do not contain required
|
||||
// user (or in the future, target channel) metadata. As such we need to do a second request
|
||||
// to find out the specifics of the user.
|
||||
var withoutReplyGroups = outgoingGroups.Where(g => joinedUserChannels.All(m => m.Id != g.Key));
|
||||
var withoutReplyGroups = outgoingGroups.Where(g => joinedPrivateChannels.All(m => m.Id != g.Key));
|
||||
|
||||
foreach (var withoutReplyGroup in withoutReplyGroups)
|
||||
{
|
||||
|
@ -58,7 +58,7 @@ namespace osu.Game.Overlays.Chat.Tabs
|
||||
case TargetType.Channel:
|
||||
return new ChannelTabItem(value) { OnRequestClose = tabCloseRequested };
|
||||
case TargetType.User:
|
||||
return new UserChannelTabItem(value) { OnRequestClose = tabCloseRequested };
|
||||
return new PrivateChannelTabItem(value) { OnRequestClose = tabCloseRequested };
|
||||
default:
|
||||
throw new InvalidOperationException("Only TargetType User and Channel are supported.");
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.Chat.Tabs
|
||||
{
|
||||
public class UserChannelTabItem : TabItem<Channel>
|
||||
public class PrivateChannelTabItem : TabItem<Channel>
|
||||
{
|
||||
private static readonly Vector2 shear = new Vector2(1f / 5f, 0);
|
||||
public override bool IsRemovable => true;
|
||||
@ -31,7 +31,7 @@ namespace osu.Game.Overlays.Chat.Tabs
|
||||
private readonly Avatar avatarContainer;
|
||||
private readonly TabCloseButton closeButton;
|
||||
|
||||
public UserChannelTabItem(Channel value)
|
||||
public PrivateChannelTabItem(Channel value)
|
||||
: base(value)
|
||||
{
|
||||
if (value.Target != TargetType.User)
|
||||
@ -163,7 +163,7 @@ namespace osu.Game.Overlays.Chat.Tabs
|
||||
closeButton.ScaleTo(new Vector2(0, 1));
|
||||
}
|
||||
|
||||
public Action<UserChannelTabItem> OnRequestClose;
|
||||
public Action<PrivateChannelTabItem> OnRequestClose;
|
||||
|
||||
private readonly EdgeEffectParameters activateEdgeEffect = new EdgeEffectParameters
|
||||
{
|
Loading…
x
Reference in New Issue
Block a user