From febfc396e328dcb31a26466b098c830f94888ef1 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Fri, 14 Apr 2023 14:57:17 +0200 Subject: [PATCH 1/2] ios: UI to cancel receiving file (#2123) * ios: UI to cancel receiving file * different alert --- apps/ios/Shared/Views/Chat/ChatView.swift | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/apps/ios/Shared/Views/Chat/ChatView.swift b/apps/ios/Shared/Views/Chat/ChatView.swift index 1cdde42c72..59783f25fa 100644 --- a/apps/ios/Shared/Views/Chat/ChatView.swift +++ b/apps/ios/Shared/Views/Chat/ChatView.swift @@ -493,7 +493,7 @@ struct ChatView: View { if ci.meta.itemDeleted == nil, let file = ci.file, file.cancellable { - menu.append(cancelFileUIAction(file.fileId)) + menu.append(cancelFileUIAction(file.fileId, sent: ci.chatDir.sent)) } if !live || !ci.meta.isLive { menu.append(deleteUIAction()) @@ -585,16 +585,15 @@ struct ChatView: View { } } - private func cancelFileUIAction(_ fileId: Int64) -> UIAction { + private func cancelFileUIAction(_ fileId: Int64, sent: Bool) -> UIAction { UIAction( - title: NSLocalizedString("Cancel", comment: "chat item action"), - image: UIImage(systemName: "xmark"), - attributes: [.destructive] + title: NSLocalizedString("Stop file", comment: "chat item action"), + image: UIImage(systemName: "xmark") ) { _ in AlertManager.shared.showAlert(Alert( - title: Text("Cancel file transfer?"), - message: Text("File transfer will be cancelled. If it's in progress it will be stoppped."), - primaryButton: .destructive(Text("Confirm")) { + title: Text(sent ? "Stop sending file?" : "Stop receiving file?"), + message: Text(sent ? "Sending file will be stopped." : "Receiving file will be stopped."), + primaryButton: .destructive(Text("Stop")) { Task { if let user = ChatModel.shared.currentUser { await cancelFile(user: user, fileId: fileId) From 96f008338422b804986f26e01891dae31fb7d105 Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Fri, 14 Apr 2023 18:05:16 +0400 Subject: [PATCH 2/2] core: 5.0.0.0 --- package.yaml | 2 +- simplex-chat.cabal | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.yaml b/package.yaml index 13016253e7..e3d2c9e33b 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: simplex-chat -version: 4.6.1.2 +version: 5.0.0.0 #synopsis: #description: homepage: https://github.com/simplex-chat/simplex-chat#readme diff --git a/simplex-chat.cabal b/simplex-chat.cabal index ba9f3af5f7..b043f71312 100644 --- a/simplex-chat.cabal +++ b/simplex-chat.cabal @@ -5,7 +5,7 @@ cabal-version: 1.12 -- see: https://github.com/sol/hpack name: simplex-chat -version: 4.6.1.2 +version: 5.0.0.0 category: Web, System, Services, Cryptography homepage: https://github.com/simplex-chat/simplex-chat#readme author: simplex.chat