[LLC] Rename AttachmentUploader to AttachmentFileUploader
Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
@@ -34,11 +34,11 @@ abstract class AttachmentFileUploader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Stream's default implementation of [AttachmentFileUploader]
|
/// Stream's default implementation of [AttachmentFileUploader]
|
||||||
class StreamAttachmentUploader implements AttachmentFileUploader {
|
class StreamAttachmentFileUploader implements AttachmentFileUploader {
|
||||||
final StreamChatClient _client;
|
final StreamChatClient _client;
|
||||||
|
|
||||||
/// Creates a new [StreamAttachmentUploader] instance.
|
/// Creates a new [StreamAttachmentFileUploader] instance.
|
||||||
const StreamAttachmentUploader(this._client);
|
const StreamAttachmentFileUploader(this._client);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<SendImageResponse> sendImage(
|
Future<SendImageResponse> sendImage(
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ class StreamChatClient {
|
|||||||
Duration receiveTimeout = const Duration(seconds: 6),
|
Duration receiveTimeout = const Duration(seconds: 6),
|
||||||
Dio httpClient,
|
Dio httpClient,
|
||||||
RetryPolicy retryPolicy,
|
RetryPolicy retryPolicy,
|
||||||
this.attachmentUploader,
|
this.attachmentFileUploader,
|
||||||
}) {
|
}) {
|
||||||
_retryPolicy ??= RetryPolicy(
|
_retryPolicy ??= RetryPolicy(
|
||||||
retryTimeout: (StreamChatClient client, int attempt, ApiError error) =>
|
retryTimeout: (StreamChatClient client, int attempt, ApiError error) =>
|
||||||
@@ -89,7 +89,7 @@ class StreamChatClient {
|
|||||||
attempt < 5,
|
attempt < 5,
|
||||||
);
|
);
|
||||||
|
|
||||||
attachmentUploader ??= StreamAttachmentUploader(this);
|
attachmentFileUploader ??= StreamAttachmentFileUploader(this);
|
||||||
|
|
||||||
state = ClientState(this);
|
state = ClientState(this);
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ class StreamChatClient {
|
|||||||
ChatPersistenceClient chatPersistenceClient;
|
ChatPersistenceClient chatPersistenceClient;
|
||||||
|
|
||||||
/// Attachment uploader
|
/// Attachment uploader
|
||||||
AttachmentFileUploader attachmentUploader;
|
AttachmentFileUploader attachmentFileUploader;
|
||||||
|
|
||||||
/// Whether the chat persistence is available or not
|
/// Whether the chat persistence is available or not
|
||||||
bool get persistenceEnabled => chatPersistenceClient != null;
|
bool get persistenceEnabled => chatPersistenceClient != null;
|
||||||
@@ -1050,7 +1050,7 @@ class StreamChatClient {
|
|||||||
ProgressCallback onSendProgress,
|
ProgressCallback onSendProgress,
|
||||||
CancelToken cancelToken,
|
CancelToken cancelToken,
|
||||||
}) {
|
}) {
|
||||||
return attachmentUploader.sendFile(
|
return attachmentFileUploader.sendFile(
|
||||||
file,
|
file,
|
||||||
channelId,
|
channelId,
|
||||||
channelType,
|
channelType,
|
||||||
@@ -1067,7 +1067,7 @@ class StreamChatClient {
|
|||||||
ProgressCallback onSendProgress,
|
ProgressCallback onSendProgress,
|
||||||
CancelToken cancelToken,
|
CancelToken cancelToken,
|
||||||
}) {
|
}) {
|
||||||
return attachmentUploader.sendImage(
|
return attachmentFileUploader.sendImage(
|
||||||
image,
|
image,
|
||||||
channelId,
|
channelId,
|
||||||
channelType,
|
channelType,
|
||||||
|
|||||||
Reference in New Issue
Block a user