Skip to content

Commit 9c3520d

Browse files
committed
Add Stream prefix to models used by the state layer for consistency + cleanup
1 parent ef8d59a commit 9c3520d

19 files changed

Lines changed: 28 additions & 27 deletions

Assets/Plugins/StreamChat/Core/IStreamChatClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ Task<StreamDeleteChannelsResponse> DeleteMultipleChannelsAsync(IEnumerable<IStre
256256
/// <summary>
257257
/// Get current state of unread counts for the user. Unread counts mean how many messages and threads are unread in the channels and threads the user is participating in
258258
/// </summary>
259-
/// <returns><see cref="CurrentUnreadCounts"/></returns>
260-
Task<CurrentUnreadCounts> GetLatestUnreadCountsAsync();
259+
/// <returns><see cref="StreamCurrentUnreadCounts"/></returns>
260+
Task<StreamCurrentUnreadCounts> GetLatestUnreadCountsAsync();
261261
}
262262
}

Assets/Plugins/StreamChat/Core/LowLevelClient/API/ChannelApi.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ public async Task<SyncResponse> SyncAsync(SyncRequest syncRequest)
148148
return dto.ToDomain<SyncResponseInternalDTO, SyncResponse>();
149149
}
150150

151-
public async Task<CurrentUnreadCounts> GetUnreadCountsAsync()
151+
public async Task<StreamCurrentUnreadCounts> GetUnreadCountsAsync()
152152
{
153153
var dto = await _internalChannelApi.GetUnreadCountsAsync();
154-
return dto.ToDomain<WrappedUnreadCountsResponseInternalDTO, CurrentUnreadCounts>();
154+
return dto.ToDomain<WrappedUnreadCountsResponseInternalDTO, StreamCurrentUnreadCounts>();
155155
}
156156

157157
private readonly IInternalChannelApi _internalChannelApi;

Assets/Plugins/StreamChat/Core/LowLevelClient/API/DeviceApi.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ public async Task<ApiResponse> AddDeviceAsync(CreateDeviceRequest device)
2323
return dto.ToDomain<ResponseInternalDTO, ApiResponse>();
2424
}
2525

26-
public async Task<ListDevicesResponse> ListDevicesAsync(string userId)
26+
public async Task<StreamListDevicesResponse> ListDevicesAsync(string userId)
2727
{
2828
var dto = await _internalDeviceApi.ListDevicesAsync(userId);
29-
return dto.ToDomain<ListDevicesResponseInternalDTO, ListDevicesResponse>();
29+
return dto.ToDomain<ListDevicesResponseInternalDTO, StreamListDevicesResponse>();
3030
}
3131

3232

Assets/Plugins/StreamChat/Core/LowLevelClient/API/IChannelApi.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,6 @@ Task<MarkReadResponse> MarkReadAsync(string channelType, string channelId,
155155
//StreamTodo: perhaps we can skip this declaration and use the Internal one directly
156156
Task<SyncResponse> SyncAsync(SyncRequest syncRequest);
157157

158-
Task<CurrentUnreadCounts> GetUnreadCountsAsync();
158+
Task<StreamCurrentUnreadCounts> GetUnreadCountsAsync();
159159
}
160160
}

Assets/Plugins/StreamChat/Core/LowLevelClient/API/IDeviceApi.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public interface IDeviceApi
2424
/// Provides a list of all devices associated with a user.
2525
/// </summary>
2626
/// <remarks>https://getstream.io/chat/docs/unity/push_devices/?language=unity</remarks>
27-
Task<ListDevicesResponse> ListDevicesAsync(string userId);
27+
Task<StreamListDevicesResponse> ListDevicesAsync(string userId);
2828

2929
/// <summary>
3030
/// <para>Removes a device.</para>

Assets/Plugins/StreamChat/Core/OperationType.cs renamed to Assets/Plugins/StreamChat/Core/Models/OperationType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace StreamChat.Core
1+
namespace StreamChat.Core.Models
22
{
33
public enum OperationType
44
{

Assets/Plugins/StreamChat/Core/OperationType.cs.meta renamed to Assets/Plugins/StreamChat/Core/Models/OperationType.cs.meta

File renamed without changes.

Assets/Plugins/StreamChat/Core/Responses/ChannelTypeUnreadCounts.cs renamed to Assets/Plugins/StreamChat/Core/Responses/StreamChannelTypeUnreadCounts.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33

44
namespace StreamChat.Core.Responses
55
{
6-
public sealed class ChannelTypeUnreadCounts : ILoadableFrom<UnreadCountsChannelTypeInternalDTO, ChannelTypeUnreadCounts>
6+
public sealed class StreamChannelTypeUnreadCounts : ILoadableFrom<UnreadCountsChannelTypeInternalDTO, StreamChannelTypeUnreadCounts>
77
{
88
public int ChannelCount { get; private set; }
99

1010
public ChannelType ChannelType { get; private set; }
1111

1212
public int UnreadCount { get; private set; }
1313

14-
ChannelTypeUnreadCounts ILoadableFrom<UnreadCountsChannelTypeInternalDTO, ChannelTypeUnreadCounts>.LoadFromDto(UnreadCountsChannelTypeInternalDTO dto)
14+
StreamChannelTypeUnreadCounts ILoadableFrom<UnreadCountsChannelTypeInternalDTO, StreamChannelTypeUnreadCounts>.LoadFromDto(UnreadCountsChannelTypeInternalDTO dto)
1515
{
1616
ChannelCount = dto.ChannelCount;
1717
ChannelType = new ChannelType(dto.ChannelType);

Assets/Plugins/StreamChat/Core/Responses/ChannelTypeUnreadCounts.cs.meta renamed to Assets/Plugins/StreamChat/Core/Responses/StreamChannelTypeUnreadCounts.cs.meta

File renamed without changes.

Assets/Plugins/StreamChat/Core/Responses/ChannelUnreadCounts.cs renamed to Assets/Plugins/StreamChat/Core/Responses/StreamChannelUnreadCounts.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace StreamChat.Core.Responses
55
{
6-
public sealed class ChannelUnreadCounts : ILoadableFrom<UnreadCountsChannelInternalDTO, ChannelUnreadCounts>
6+
public sealed class StreamChannelUnreadCounts : ILoadableFrom<UnreadCountsChannelInternalDTO, StreamChannelUnreadCounts>
77
{
88
/// <summary>
99
/// CID of the channel
@@ -20,7 +20,7 @@ public sealed class ChannelUnreadCounts : ILoadableFrom<UnreadCountsChannelInte
2020
/// </summary>
2121
public int UnreadCount { get; private set; }
2222

23-
ChannelUnreadCounts ILoadableFrom<UnreadCountsChannelInternalDTO, ChannelUnreadCounts>.LoadFromDto(UnreadCountsChannelInternalDTO dto)
23+
StreamChannelUnreadCounts ILoadableFrom<UnreadCountsChannelInternalDTO, StreamChannelUnreadCounts>.LoadFromDto(UnreadCountsChannelInternalDTO dto)
2424
{
2525
ChannelCid = dto.ChannelId;
2626
LastRead = dto.LastRead;

0 commit comments

Comments
 (0)