💄 Give name for pasted image
This commit is contained in:
@@ -143,7 +143,12 @@ RoomInputManager useRoomInputManager(WidgetRef ref, String roomId) {
|
|||||||
final newAttachments = [
|
final newAttachments = [
|
||||||
...attachments.value,
|
...attachments.value,
|
||||||
UniversalFile(
|
UniversalFile(
|
||||||
data: XFile.fromData(image, mimeType: "image/jpeg"),
|
displayName: 'image.jpeg',
|
||||||
|
data: XFile.fromData(
|
||||||
|
image,
|
||||||
|
mimeType: "image/jpeg",
|
||||||
|
name: 'image.jpeg',
|
||||||
|
),
|
||||||
type: UniversalFileType.image,
|
type: UniversalFileType.image,
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -284,7 +284,12 @@ class ChatInput extends HookConsumerWidget {
|
|||||||
onAttachmentsChanged([
|
onAttachmentsChanged([
|
||||||
...attachments,
|
...attachments,
|
||||||
UniversalFile(
|
UniversalFile(
|
||||||
data: XFile.fromData(image, mimeType: "image/jpeg"),
|
displayName: 'image.jpeg',
|
||||||
|
data: XFile.fromData(
|
||||||
|
image,
|
||||||
|
mimeType: "image/jpeg",
|
||||||
|
name: 'image.jpeg',
|
||||||
|
),
|
||||||
type: UniversalFileType.image,
|
type: UniversalFileType.image,
|
||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -811,7 +811,12 @@ class ComposeLogic {
|
|||||||
state.attachments.value = [
|
state.attachments.value = [
|
||||||
...state.attachments.value,
|
...state.attachments.value,
|
||||||
UniversalFile(
|
UniversalFile(
|
||||||
data: XFile.fromData(clipboard, mimeType: "image/jpeg"),
|
displayName: 'image.jpeg',
|
||||||
|
data: XFile.fromData(
|
||||||
|
clipboard,
|
||||||
|
mimeType: "image/jpeg",
|
||||||
|
name: 'image.jpeg',
|
||||||
|
),
|
||||||
type: UniversalFileType.image,
|
type: UniversalFileType.image,
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user