diff --git a/Session/Conversations/ConversationVC+Interaction.swift b/Session/Conversations/ConversationVC+Interaction.swift index b3c3b744e..72f35060f 100644 --- a/Session/Conversations/ConversationVC+Interaction.swift +++ b/Session/Conversations/ConversationVC+Interaction.swift @@ -2175,7 +2175,7 @@ extension ConversationVC: }(), style: .destructive ) { [weak self] _ in - let completeServerDeletion = { [weak self] in + let completeServerDeletion = { Storage.shared.writeAsync { db in try MessageSender .send( @@ -2187,24 +2187,24 @@ extension ConversationVC: using: dependencies ) } + } - // We can only delete messages on the server for `contact` and `group` conversations - guard cellViewModel.threadVariant == .contact || cellViewModel.threadVariant == .group else { - return completeServerDeletion() - } - - deleteRemotely( - from: self, - request: SnodeAPI - .deleteMessages( - swarmPublicKey: targetPublicKey, - serverHashes: [serverHash] - ) - .map { _ in () } - .eraseToAnyPublisher() - ) { completeServerDeletion() } - }) - } + // We can only delete messages on the server for `contact` and `group` conversations + guard cellViewModel.threadVariant == .contact || cellViewModel.threadVariant == .group else { + return completeServerDeletion() + } + + deleteRemotely( + from: self, + request: SnodeAPI + .deleteMessages( + swarmPublicKey: targetPublicKey, + serverHashes: [serverHash] + ) + .map { _ in () } + .eraseToAnyPublisher() + ) { completeServerDeletion() } + }) actionSheet.addAction(UIAlertAction.init(title: "cancel".localized(), style: .cancel) { [weak self] _ in self?.showInputAccessoryView() diff --git a/Session/Media Viewing & Editing/SendMediaNavigationController.swift b/Session/Media Viewing & Editing/SendMediaNavigationController.swift index 418930cfe..310e751d2 100644 --- a/Session/Media Viewing & Editing/SendMediaNavigationController.swift +++ b/Session/Media Viewing & Editing/SendMediaNavigationController.swift @@ -362,8 +362,8 @@ extension SendMediaNavigationController: ImagePickerGridControllerDelegate { guard self?.pushApprovalViewController() == true else { let modal: ConfirmationModal = ConfirmationModal( info: ConfirmationModal.Info( - title: "IMAGE_PICKER_FAILED_TO_PROCESS_ATTACHMENTS".localized(), - cancelTitle: "BUTTON_OK".localized(), + title: "attachmentsErrorMediaSelection".localized(), + cancelTitle: "okay".localized(), cancelStyle: .alert_text ) ) diff --git a/SessionUtilitiesKit/General/Localization.swift b/SessionUtilitiesKit/General/Localization.swift index d0f69a2c7..485c9d70d 100644 --- a/SessionUtilitiesKit/General/Localization.swift +++ b/SessionUtilitiesKit/General/Localization.swift @@ -2,7 +2,7 @@ // stringlint:disable -import Foundation +import UIKit public extension NSAttributedString { /// These are the tags we current support formatting for