Fix some mobile layout problems

This commit is contained in:
2025-08-12 14:16:05 +02:00
parent 8aeef63886
commit 864f0a5a45
6 changed files with 237 additions and 34 deletions

View File

@@ -278,7 +278,21 @@ const sendPhoto = async () => {
})
// Upload photo
await apiService.uploadFile(appStore.currentChannelId!, message.id, file)
const uploadedFile = await apiService.uploadFile(appStore.currentChannelId!, message.id, file)
// Immediately update the local message with file metadata
const updatedMessage = {
...message,
fileId: uploadedFile.id,
filePath: uploadedFile.file_path,
fileType: uploadedFile.file_type,
fileSize: uploadedFile.file_size,
originalName: uploadedFile.original_name,
fileCreatedAt: uploadedFile.created_at
}
// Update the message in the store
appStore.updateMessage(message.id, updatedMessage)
toastStore.success('Photo sent!')
emit('sent')