This commit is contained in:
fmodf 2024-09-02 19:35:08 +02:00
parent 444545b1d8
commit 412500198f
5 changed files with 14 additions and 1 deletions

View file

@ -117,4 +117,5 @@ unused_declaration:
# paths to ignore during linting. Takes precedence over `included`. # paths to ignore during linting. Takes precedence over `included`.
excluded: excluded:
- SomePathHere - .swiftgen
- "**/Generated"

View file

@ -25,6 +25,11 @@ final class ClientMartinMessagesManager {
#endif #endif
// Try to recognize if message is omemo-encoded and decode it // 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) { if let msg = Message.map(message) {
Task { Task {

View file

@ -186,10 +186,13 @@ private struct AttachmentView: View {
switch type { switch type {
case .image: case .image:
return "photo" return "photo"
case .audio: case .audio:
return "music.note" return "music.note"
case .video: case .video:
return "film" return "film"
case .file: case .file:
return "doc" return "doc"
} }

View file

@ -155,6 +155,7 @@ final class FileProcessing {
switch type { switch type {
case .photo: case .photo:
localName = "\(newMessageId)_\(fileId).jpg" localName = "\(newMessageId)_\(fileId).jpg"
case .video: case .video:
localName = "\(newMessageId)_\(fileId).mov" localName = "\(newMessageId)_\(fileId).mov"
} }

View file

@ -184,10 +184,13 @@ private struct AttachmentView: View {
switch type { switch type {
case .image: case .image:
return "photo" return "photo"
case .audio: case .audio:
return "music.note" return "music.note"
case .movie: case .movie:
return "film" return "film"
case .file: case .file:
return "doc" return "doc"
} }