From 412500198f259ed51277f4c1d96141ea21b01cab Mon Sep 17 00:00:00 2001 From: fmodf Date: Mon, 2 Sep 2024 19:35:08 +0200 Subject: [PATCH] wip --- .swiftlint.yml | 3 ++- .../AppData/Client/Client+MartinMessages.swift | 5 +++++ .../Main/Conversation/ConversationMessageContainer.swift | 3 +++ old/AppCore/Files/FileProcessing.swift | 1 + .../Screens/Conversation/ConversationMessageContainer.swift | 3 +++ 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.swiftlint.yml b/.swiftlint.yml index a59820e..b52a95c 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -117,4 +117,5 @@ unused_declaration: # paths to ignore during linting. Takes precedence over `included`. excluded: - - SomePathHere + - .swiftgen + - "**/Generated" diff --git a/ConversationsClassic/AppData/Client/Client+MartinMessages.swift b/ConversationsClassic/AppData/Client/Client+MartinMessages.swift index 0eeb57a..ad553f0 100644 --- a/ConversationsClassic/AppData/Client/Client+MartinMessages.swift +++ b/ConversationsClassic/AppData/Client/Client+MartinMessages.swift @@ -25,6 +25,11 @@ final class ClientMartinMessagesManager { #endif // Try to recognize if message is omemo-encoded and decode it + // if let omemo = OMEMO.decode(message: message, chat: chat) { + // // If it is omemo-encoded, save it and return + // saveMessage(omemo) + // return + // } if let msg = Message.map(message) { Task { diff --git a/ConversationsClassic/View/Main/Conversation/ConversationMessageContainer.swift b/ConversationsClassic/View/Main/Conversation/ConversationMessageContainer.swift index 7d5c22f..ffb7915 100644 --- a/ConversationsClassic/View/Main/Conversation/ConversationMessageContainer.swift +++ b/ConversationsClassic/View/Main/Conversation/ConversationMessageContainer.swift @@ -186,10 +186,13 @@ private struct AttachmentView: View { switch type { case .image: return "photo" + case .audio: return "music.note" + case .video: return "film" + case .file: return "doc" } diff --git a/old/AppCore/Files/FileProcessing.swift b/old/AppCore/Files/FileProcessing.swift index 9845fac..14b0048 100644 --- a/old/AppCore/Files/FileProcessing.swift +++ b/old/AppCore/Files/FileProcessing.swift @@ -155,6 +155,7 @@ final class FileProcessing { switch type { case .photo: localName = "\(newMessageId)_\(fileId).jpg" + case .video: localName = "\(newMessageId)_\(fileId).mov" } diff --git a/old/View/Screens/Conversation/ConversationMessageContainer.swift b/old/View/Screens/Conversation/ConversationMessageContainer.swift index 36cae1f..0de1616 100644 --- a/old/View/Screens/Conversation/ConversationMessageContainer.swift +++ b/old/View/Screens/Conversation/ConversationMessageContainer.swift @@ -184,10 +184,13 @@ private struct AttachmentView: View { switch type { case .image: return "photo" + case .audio: return "music.note" + case .movie: return "film" + case .file: return "doc" }