mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-29 04:39:53 +00:00
mobile: increased size of voice messages (#2150)
* android: increased size of voice messages * ios: increased size of voice messages * size changes * increase audio quality to 16kHz/32Kbps, refactor auto-accept logic --------- Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
This commit is contained in:
parent
0ec2468dce
commit
baf3a12009
14 changed files with 69 additions and 66 deletions
|
@ -271,25 +271,8 @@ func receivedMsgNtf(_ res: ChatResponse) async -> (String, NSENotification)? {
|
|||
if !cInfo.ntfsEnabled {
|
||||
ntfBadgeCountGroupDefault.set(max(0, ntfBadgeCountGroupDefault.get() - 1))
|
||||
}
|
||||
if case .image = cItem.content.msgContent {
|
||||
if let file = cItem.file,
|
||||
file.fileSize <= MAX_IMAGE_SIZE_AUTO_RCV,
|
||||
privacyAcceptImagesGroupDefault.get() {
|
||||
cItem = autoReceiveFile(file) ?? cItem
|
||||
}
|
||||
} else if case .video = cItem.content.msgContent {
|
||||
if let file = cItem.file,
|
||||
file.fileSize <= MAX_VIDEO_SIZE_AUTO_RCV,
|
||||
privacyAcceptImagesGroupDefault.get() {
|
||||
cItem = autoReceiveFile(file) ?? cItem
|
||||
}
|
||||
} else if case .voice = cItem.content.msgContent { // TODO check inlineFileMode != IFMSent
|
||||
if let file = cItem.file,
|
||||
file.fileSize <= MAX_IMAGE_SIZE,
|
||||
file.fileSize > MAX_VOICE_MESSAGE_SIZE_INLINE_SEND,
|
||||
privacyAcceptImagesGroupDefault.get() {
|
||||
cItem = autoReceiveFile(file) ?? cItem
|
||||
}
|
||||
if let file = cItem.autoReceiveFile() {
|
||||
cItem = autoReceiveFile(file) ?? cItem
|
||||
}
|
||||
let ntf: NSENotification = cInfo.ntfsEnabled ? .nse(notification: createMessageReceivedNtf(user, cInfo, cItem)) : .empty
|
||||
return cItem.showMutableNotification ? (aChatItem.chatId, ntf) : nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue