diff --git a/apps/android/app/src/main/java/chat/simplex/app/model/SimpleXAPI.kt b/apps/android/app/src/main/java/chat/simplex/app/model/SimpleXAPI.kt index ba96f7be04..1e7afd0875 100644 --- a/apps/android/app/src/main/java/chat/simplex/app/model/SimpleXAPI.kt +++ b/apps/android/app/src/main/java/chat/simplex/app/model/SimpleXAPI.kt @@ -360,7 +360,7 @@ open class ChatController(private val ctrl: ChatCtrl, private val ntfManager: Nt val cItem = r.chatItem.chatItem chatModel.addChatItem(cInfo, cItem) val file = cItem.file - if (file != null && file.fileSize <= 394500) { // 236700 + if (file != null && file.fileSize <= 236700) { // 394500 withApi {receiveFile(file.fileId)} } if (!isAppOnForeground(appContext) || chatModel.chatId.value != cInfo.id) { diff --git a/apps/android/app/src/main/java/chat/simplex/app/views/chat/ComposeView.kt b/apps/android/app/src/main/java/chat/simplex/app/views/chat/ComposeView.kt index 6573ee6449..acc57003de 100644 --- a/apps/android/app/src/main/java/chat/simplex/app/views/chat/ComposeView.kt +++ b/apps/android/app/src/main/java/chat/simplex/app/views/chat/ComposeView.kt @@ -62,24 +62,26 @@ fun ComposeView( else -> {} } Row( - modifier = Modifier.padding(start = 2.dp, end = 8.dp), + modifier = Modifier.padding(horizontal = 8.dp), +// // use this padding when attach button is uncommented +// modifier = Modifier.padding(start = 2.dp, end = 8.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(2.dp) ) { - Icon( - Icons.Outlined.AddCircleOutline, - contentDescription = generalGetString(R.string.attach), - tint = if (editingItem.value == null) MaterialTheme.colors.primary else Color.Gray, - modifier = Modifier - .size(40.dp) - .padding(vertical = 4.dp) - .clip(CircleShape) - .clickable { - if (editingItem.value == null) { - showBottomSheet() - } - } - ) +// Icon( +// Icons.Outlined.AddCircleOutline, +// contentDescription = generalGetString(R.string.attach), +// tint = if (editingItem.value == null) MaterialTheme.colors.primary else Color.Gray, +// modifier = Modifier +// .size(40.dp) +// .padding(vertical = 4.dp) +// .clip(CircleShape) +// .clickable { +// if (editingItem.value == null) { +// showBottomSheet() +// } +// } +// ) SendMsgView(msg, linkPreview, cancelledLinks, parseMarkdown, sendMessage, editing = editingItem.value != null, sendEnabled = msg.value.isNotEmpty() || imagePreview.value != null) } diff --git a/apps/android/app/src/main/java/chat/simplex/app/views/chat/item/ChatItemView.kt b/apps/android/app/src/main/java/chat/simplex/app/views/chat/item/ChatItemView.kt index 4f02622c58..0f5e55f59f 100644 --- a/apps/android/app/src/main/java/chat/simplex/app/views/chat/item/ChatItemView.kt +++ b/apps/android/app/src/main/java/chat/simplex/app/views/chat/item/ChatItemView.kt @@ -126,13 +126,13 @@ fun deleteMessageAlertDialog(chatItem: ChatItem, deleteMessage: (Long, CIDeleteM deleteMessage(chatItem.id, CIDeleteMode.cidmInternal) AlertManager.shared.hideAlert() }) { Text(generalGetString(R.string.for_me_only)) } -// if (chatItem.meta.editable) { -// Spacer(Modifier.padding(horizontal = 4.dp)) -// Button(onClick = { -// deleteMessage(chatItem.id, CIDeleteMode.cidmBroadcast) -// AlertManager.shared.hideAlert() -// }) { Text(generalGetString(R.string.for_everybody)) } -// } + if (chatItem.meta.editable) { + Spacer(Modifier.padding(horizontal = 4.dp)) + Button(onClick = { + deleteMessage(chatItem.id, CIDeleteMode.cidmBroadcast) + AlertManager.shared.hideAlert() + }) { Text(generalGetString(R.string.for_everybody)) } + } } } ) diff --git a/apps/android/app/src/main/res/values/strings.xml b/apps/android/app/src/main/res/values/strings.xml index 696d9380b0..29b95f2921 100644 --- a/apps/android/app/src/main/res/values/strings.xml +++ b/apps/android/app/src/main/res/values/strings.xml @@ -55,7 +55,7 @@ Delete message? Message will be deleted - this cannot be undone! For me only - For everybody + For everyone edited diff --git a/apps/ios/Shared/Model/SimpleXAPI.swift b/apps/ios/Shared/Model/SimpleXAPI.swift index 06582e075b..e173f865cd 100644 --- a/apps/ios/Shared/Model/SimpleXAPI.swift +++ b/apps/ios/Shared/Model/SimpleXAPI.swift @@ -689,8 +689,8 @@ func processReceivedMsg(_ res: ChatResponse) { let cItem = aChatItem.chatItem chatModel.addChatItem(cInfo, cItem) if let file = cItem.file, - file.fileSize <= 394500 { - // file.fileSize <= 236700 { + file.fileSize <= 236700 { + // file.fileSize <= 394500 { Task { do { try await receiveFile(fileId: file.fileId) diff --git a/apps/ios/Shared/Views/Chat/ChatView.swift b/apps/ios/Shared/Views/Chat/ChatView.swift index 411290a8c2..00068617f6 100644 --- a/apps/ios/Shared/Views/Chat/ChatView.swift +++ b/apps/ios/Shared/Views/Chat/ChatView.swift @@ -169,12 +169,12 @@ struct ChatView: View { Button("Delete for me", role: .destructive) { deleteMessage(.cidmInternal) } -// if let di = deletingItem { -// if di.meta.editable { -// Button("Delete for everyone",role: .destructive) { deleteMessage(.cidmBroadcast) -// } -// } -// } + if let di = deletingItem { + if di.meta.editable { + Button("Delete for everyone",role: .destructive) { deleteMessage(.cidmBroadcast) + } + } + } } .frame(maxWidth: maxWidth, maxHeight: .infinity, alignment: alignment) .frame(minWidth: 0, maxWidth: .infinity, alignment: alignment) diff --git a/apps/ios/Shared/Views/Chat/ComposeMessage/ComposeView.swift b/apps/ios/Shared/Views/Chat/ComposeMessage/ComposeView.swift index 766103ae8a..62e9eec0dd 100644 --- a/apps/ios/Shared/Views/Chat/ComposeMessage/ComposeView.swift +++ b/apps/ios/Shared/Views/Chat/ComposeMessage/ComposeView.swift @@ -69,16 +69,16 @@ struct ComposeView: View { ContextItemView(contextItem: $editingItem, editing: $editing, resetMessage: resetMessage) } HStack{ - Button { - showChooseSource = true - } label: { - Image(systemName: "paperclip") - .resizable() - } - .disabled(editingItem != nil) - .frame(width: 25, height: 25) - .padding(.vertical, 4) - .padding(.leading, 12) +// Button { +// showChooseSource = true +// } label: { +// Image(systemName: "paperclip") +// .resizable() +// } +// .disabled(editingItem != nil) +// .frame(width: 25, height: 25) +// .padding(.vertical, 4) +// .padding(.leading, 12) SendMessageView( sendMessage: { text in sendMessage(text) @@ -90,7 +90,9 @@ struct ComposeView: View { editing: $editing, sendEnabled: $sendEnabled ) - .padding(.trailing, 12) + .padding(.horizontal, 12) +// // use this padding when attach button is uncommented +// .padding(.trailing, 12) .background(.background) } } diff --git a/apps/ios/SimpleX Localizations/en.xcloc/Localized Contents/en.xliff b/apps/ios/SimpleX Localizations/en.xcloc/Localized Contents/en.xliff index f41e3bd49e..aa9a798ad1 100644 --- a/apps/ios/SimpleX Localizations/en.xcloc/Localized Contents/en.xliff +++ b/apps/ios/SimpleX Localizations/en.xcloc/Localized Contents/en.xliff @@ -275,6 +275,11 @@ Delete contact? No comment provided by engineer. + + Delete for everyone + Delete for everyone + No comment provided by engineer. + Delete for me Delete for me diff --git a/apps/ios/SimpleX Localizations/ru.xcloc/Localized Contents/ru.xliff b/apps/ios/SimpleX Localizations/ru.xcloc/Localized Contents/ru.xliff index 09ef020ac1..b261a35a1e 100644 --- a/apps/ios/SimpleX Localizations/ru.xcloc/Localized Contents/ru.xliff +++ b/apps/ios/SimpleX Localizations/ru.xcloc/Localized Contents/ru.xliff @@ -275,6 +275,11 @@ Удалить контакт? No comment provided by engineer. + + Delete for everyone + Удалить для всех + No comment provided by engineer. + Delete for me Удалить для меня diff --git a/apps/ios/ru.lproj/Localizable.strings b/apps/ios/ru.lproj/Localizable.strings index 0a4535be13..a443721cf1 100644 --- a/apps/ios/ru.lproj/Localizable.strings +++ b/apps/ios/ru.lproj/Localizable.strings @@ -190,6 +190,9 @@ /* No comment provided by engineer. */ "Delete contact?" = "Удалить контакт?"; +/* No comment provided by engineer. */ +"Delete for everyone" = "Удалить для всех"; + /* No comment provided by engineer. */ "Delete for me" = "Удалить для меня";