diff --git a/Session/Conversations/Context Menu/ContextMenuVC+Action.swift b/Session/Conversations/Context Menu/ContextMenuVC+Action.swift index 04e652f8f..a66dcfef3 100644 --- a/Session/Conversations/Context Menu/ContextMenuVC+Action.swift +++ b/Session/Conversations/Context Menu/ContextMenuVC+Action.swift @@ -136,7 +136,8 @@ extension ContextMenuVC { switch cellViewModel.variant { case .standardIncomingDeleted, .infoCall, .infoScreenshotNotification, .infoMediaSavedNotification, - .infoClosedGroupCreated, .infoClosedGroupUpdated, .infoClosedGroupCurrentUserLeft, + .infoClosedGroupCreated, .infoClosedGroupUpdated, + .infoClosedGroupCurrentUserLeft, .infoClosedGroupCurrentUserLeaving, .infoClosedGroupCurrentUserErrorLeaving, .infoMessageRequestAccepted, .infoDisappearingMessagesUpdate: // Let the user delete info messages and unsent messages return [ Action.delete(cellViewModel, delegate) ] diff --git a/Session/Conversations/ConversationVC+Interaction.swift b/Session/Conversations/ConversationVC+Interaction.swift index a8ca98c6d..980c0eb0c 100644 --- a/Session/Conversations/ConversationVC+Interaction.swift +++ b/Session/Conversations/ConversationVC+Interaction.swift @@ -1694,7 +1694,8 @@ extension ConversationVC: switch cellViewModel.variant { case .standardIncomingDeleted, .infoCall, .infoScreenshotNotification, .infoMediaSavedNotification, - .infoClosedGroupCreated, .infoClosedGroupUpdated, .infoClosedGroupCurrentUserLeft, + .infoClosedGroupCreated, .infoClosedGroupUpdated, + .infoClosedGroupCurrentUserLeft, .infoClosedGroupCurrentUserLeaving, .infoClosedGroupCurrentUserErrorLeaving, .infoMessageRequestAccepted, .infoDisappearingMessagesUpdate: // Info messages and unsent messages should just trigger a local // deletion (they are created as side effects so we wouldn't be diff --git a/Session/Conversations/Message Cells/MessageCell.swift b/Session/Conversations/Message Cells/MessageCell.swift index 1f7356bc2..44886ba9c 100644 --- a/Session/Conversations/Message Cells/MessageCell.swift +++ b/Session/Conversations/Message Cells/MessageCell.swift @@ -70,7 +70,8 @@ public class MessageCell: UITableViewCell { case .standardOutgoing, .standardIncoming, .standardIncomingDeleted: return VisibleMessageCell.self - case .infoClosedGroupCreated, .infoClosedGroupUpdated, .infoClosedGroupCurrentUserLeft, + case .infoClosedGroupCreated, .infoClosedGroupUpdated, + .infoClosedGroupCurrentUserLeft, .infoClosedGroupCurrentUserLeaving, .infoClosedGroupCurrentUserErrorLeaving, .infoDisappearingMessagesUpdate, .infoScreenshotNotification, .infoMediaSavedNotification, .infoMessageRequestAccepted: return InfoMessageCell.self diff --git a/Session/Home/HomeVC.swift b/Session/Home/HomeVC.swift index c97c01ef2..d95c76515 100644 --- a/Session/Home/HomeVC.swift +++ b/Session/Home/HomeVC.swift @@ -630,8 +630,8 @@ final class HomeVC: BaseVC, UITableViewDataSource, UITableViewDelegate, SeedRemi let hasUnread: Bool = (threadViewModel.threadUnreadCount ?? 0) > 0 let mark: UIContextualAction = UIContextualAction( title: ((hasUnread) ? "mark_read_button_text".localized() : "mark_unread_button_text".localized()), - icon: ((hasUnread) ? UIImage(named: "icon_mark_read") : UIImage(named: "icon_mark_unread")), - iconHeight: Values.mediumFontSize, + icon: ((hasUnread) ? UIImage(systemName: "envelope.open") : UIImage(systemName: "envelope.badge")), + iconHeight: Values.smallFontSize, themeTintColor: .textPrimary, themeBackgroundColor: .conversationButton_swipeDestructive, side: .trailing, @@ -689,7 +689,7 @@ final class HomeVC: BaseVC, UITableViewDataSource, UITableViewDelegate, SeedRemi let pin: UIContextualAction = UIContextualAction( title: (threadViewModel.threadIsPinned ? "UNPIN_BUTTON_TEXT".localized() : "PIN_BUTTON_TEXT".localized()), - icon: UIImage(named: "icon_pin"), + icon: UIImage(systemName: "pin"), iconHeight: Values.mediumFontSize, themeTintColor: .textPrimary, themeBackgroundColor: .conversationButton_swipeDestructive, @@ -716,7 +716,7 @@ final class HomeVC: BaseVC, UITableViewDataSource, UITableViewDelegate, SeedRemi let mute: UIContextualAction = UIContextualAction( title: ((threadViewModel.threadMutedUntilTimestamp != nil) ? "unmute_button_text".localized() : "mute_button_text".localized()), - icon: UIImage(named: "icon_mute"), + icon: UIImage(systemName: "speaker.slash"), iconHeight: Values.mediumFontSize, themeTintColor: .textPrimary, themeBackgroundColor: .conversationButton_swipeDestructive, @@ -759,8 +759,8 @@ final class HomeVC: BaseVC, UITableViewDataSource, UITableViewDelegate, SeedRemi case .contact: let delete: UIContextualAction = UIContextualAction( title: "TXT_DELETE_TITLE".localized(), - icon: UIImage(named: "icon_bin"), - iconHeight: Values.smallFontSize, + icon: UIImage(named: "icon_bin")?.resizedImage(to: CGSize(width: Values.mediumFontSize, height: Values.mediumFontSize)), + iconHeight: Values.mediumFontSize, themeTintColor: .textPrimary, themeBackgroundColor: .conversationButton_swipeDestructive, side: .trailing, @@ -801,7 +801,7 @@ final class HomeVC: BaseVC, UITableViewDataSource, UITableViewDelegate, SeedRemi case .openGroup, .closedGroup: let leave: UIContextualAction = UIContextualAction( title: "LEAVE_BUTTON_TITLE".localized(), - icon: UIImage(named: "icon_leave"), + icon: UIImage(systemName: "rectangle.portrait.and.arrow.right"), iconHeight: Values.mediumFontSize, themeTintColor: .textPrimary, themeBackgroundColor: .conversationButton_swipeDestructive, diff --git a/Session/Home/HomeViewModel.swift b/Session/Home/HomeViewModel.swift index 30f44b6d5..73d899a94 100644 --- a/Session/Home/HomeViewModel.swift +++ b/Session/Home/HomeViewModel.swift @@ -307,17 +307,26 @@ public class HomeViewModel { case .closedGroup: try MessageSender .leave(db, groupPublicKey: threadId) + .done { + Storage.shared.writeAsync { db in + _ = try SessionThread + .filter(id: threadId) + .deleteAll(db) + } + } + .catch { _ in + + } .retainUntilComplete() case .openGroup: OpenGroupManager.shared.delete(db, openGroupId: threadId) + _ = try SessionThread + .filter(id: threadId) + .deleteAll(db) default: break } - - _ = try SessionThread - .filter(id: threadId) - .deleteAll(db) } } } diff --git a/Session/Meta/Images.xcassets/Session/icon_leave.imageset/Contents.json b/Session/Meta/Images.xcassets/Session/icon_leave.imageset/Contents.json deleted file mode 100644 index ab1509796..000000000 --- a/Session/Meta/Images.xcassets/Session/icon_leave.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "filename" : "Group 21.pdf", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Session/Meta/Images.xcassets/Session/icon_leave.imageset/Group 21.pdf b/Session/Meta/Images.xcassets/Session/icon_leave.imageset/Group 21.pdf deleted file mode 100644 index ad9dca31b..000000000 --- a/Session/Meta/Images.xcassets/Session/icon_leave.imageset/Group 21.pdf +++ /dev/null @@ -1,115 +0,0 @@ -%PDF-1.7 - -1 0 obj - << >> -endobj - -2 0 obj - << /Length 3 0 R >> -stream -/DeviceRGB CS -/DeviceRGB cs -q --1.000000 0.000000 -0.000000 -1.000000 13.681108 22.054058 cm -1.000000 1.000000 1.000000 scn -0.000000 8.699632 m -0.000000 2.779560 l -0.000000 1.114012 1.164413 0.000002 2.902360 0.000002 c -10.825995 0.000002 l -12.538525 0.000002 13.681101 1.114012 13.681101 2.781368 c -13.681101 19.272701 l -13.681101 20.941874 12.538525 22.054058 10.825995 22.054058 c -2.902360 22.054058 l -1.164413 22.054058 0.000000 20.941874 0.000000 19.274517 c -0.000000 13.337048 l -1.977312 13.337048 l -1.977312 18.819965 l -1.977312 19.588516 2.433078 20.022297 3.241149 20.022297 c -10.451877 20.022297 l -11.249847 20.022297 11.705621 19.584885 11.705621 18.818157 c -11.705621 3.235851 l -11.705621 2.469200 11.249847 2.031755 10.451877 2.031755 c -3.241149 2.031755 l -2.433078 2.031755 1.977312 2.465502 1.977312 3.234045 c -1.977312 8.699632 l -0.000000 8.699632 l -h -f -n -Q -q -1.000000 -0.000000 0.000000 1.000000 6.456984 6.532265 cm -1.000000 1.000000 1.000000 scn -0.854047 3.650497 m -9.973925 3.650497 l -11.921844 3.749533 l -9.937829 1.989250 l -9.383045 1.430826 l -9.235626 1.271473 9.126730 1.047242 9.126730 0.808298 c -9.126730 0.331357 9.478227 0.000003 9.940446 0.000003 c -10.176593 0.000003 10.389956 0.087940 10.547450 0.247207 c -14.110446 3.806581 l -14.335536 4.023411 14.448080 4.265796 14.448080 4.493468 c -14.448080 4.722947 14.335536 4.980132 14.110446 5.190423 c -10.547450 8.741562 l -10.389956 8.900881 10.176593 8.988800 9.940446 8.988800 c -9.478227 8.988800 9.126730 8.657471 9.126730 8.186983 c -9.126730 7.939745 9.231996 7.725583 9.383045 7.566264 c -9.937829 6.997773 l -11.921844 5.245663 l -9.973925 5.346506 l -0.854047 5.346506 l -0.340408 5.346506 0.000000 4.944596 0.000000 4.493468 c -0.000000 4.044147 0.340408 3.650497 0.854047 3.650497 c -h -f -n -Q - -endstream -endobj - -3 0 obj - 1767 -endobj - -4 0 obj - << /Annots [] - /Type /Page - /MediaBox [ 0.000000 0.000000 20.905060 22.054062 ] - /Resources 1 0 R - /Contents 2 0 R - /Parent 5 0 R - >> -endobj - -5 0 obj - << /Kids [ 4 0 R ] - /Count 1 - /Type /Pages - >> -endobj - -6 0 obj - << /Pages 5 0 R - /Type /Catalog - >> -endobj - -xref -0 7 -0000000000 65535 f -0000000010 00000 n -0000000034 00000 n -0000001857 00000 n -0000001880 00000 n -0000002053 00000 n -0000002127 00000 n -trailer -<< /ID [ (some) (id) ] - /Root 6 0 R - /Size 7 ->> -startxref -2186 -%%EOF \ No newline at end of file diff --git a/Session/Meta/Images.xcassets/Session/icon_mark_read.imageset/Contents.json b/Session/Meta/Images.xcassets/Session/icon_mark_read.imageset/Contents.json deleted file mode 100644 index c6f97a05d..000000000 --- a/Session/Meta/Images.xcassets/Session/icon_mark_read.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "filename" : "Vector.pdf", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Session/Meta/Images.xcassets/Session/icon_mark_read.imageset/Vector.pdf b/Session/Meta/Images.xcassets/Session/icon_mark_read.imageset/Vector.pdf deleted file mode 100644 index 1c44b148b..000000000 --- a/Session/Meta/Images.xcassets/Session/icon_mark_read.imageset/Vector.pdf +++ /dev/null @@ -1,115 +0,0 @@ -%PDF-1.7 - -1 0 obj - << >> -endobj - -2 0 obj - << /Length 3 0 R >> -stream -/DeviceRGB CS -/DeviceRGB cs -q -1.000000 0.000000 -0.000000 1.000000 0.000000 0.000000 cm -1.000000 1.000000 1.000000 scn -2.855198 -0.000004 m -16.669914 -0.000004 l -18.550127 -0.000004 19.526665 0.969404 19.526665 2.826668 c -19.526665 11.389789 l -19.526665 12.870333 19.235811 13.360014 18.252293 14.098968 c -11.707531 19.132406 l -10.997782 19.677958 10.466211 20.000000 9.762552 20.000000 c -9.060527 20.000000 8.530442 19.677958 7.819207 19.132406 c -1.274408 14.098968 l -0.295581 13.363148 0.000000 12.870333 0.000000 11.389789 c -0.000000 2.826668 l -0.000000 0.962275 0.976567 -0.000004 2.855198 -0.000004 c -h -2.851544 1.613646 m -2.040694 1.613646 1.599581 2.032692 1.599581 2.881479 c -1.599581 11.580967 l -1.599581 12.240508 1.779054 12.556168 2.225032 12.890715 c -8.729047 17.882366 l -9.139924 18.197447 9.379602 18.366127 9.762552 18.366127 c -10.139932 18.366127 10.388373 18.195879 10.797616 17.882366 c -17.298483 12.890715 l -17.744492 12.552974 17.927126 12.240508 17.927126 11.580967 c -17.927126 2.881479 l -17.927126 2.032692 17.471687 1.613646 16.673553 1.613646 c -2.851544 1.613646 l -h -1.064996 1.914450 m -2.115197 0.869879 l -8.758162 7.423330 l -9.115859 7.786597 9.427136 7.942571 9.754902 7.942571 c -10.075537 7.942571 10.388373 7.786597 10.751641 7.423330 c -17.396152 0.869879 l -18.437677 1.914450 l -11.638903 8.596021 l -11.013972 9.219392 10.398623 9.481946 9.754902 9.481946 c -9.104050 9.481946 8.495831 9.221025 7.869340 8.596021 c -1.064996 1.914450 l -h -6.495846 6.892206 m -7.547591 7.929720 l -2.146882 13.280460 l -1.103819 12.235829 l -6.495846 6.892206 l -h -11.962213 7.929720 m -13.006858 6.892206 l -18.400393 12.235829 l -17.355822 13.280460 l -11.962213 7.929720 l -h -f -n -Q - -endstream -endobj - -3 0 obj - 1685 -endobj - -4 0 obj - << /Annots [] - /Type /Page - /MediaBox [ 0.000000 0.000000 19.526665 20.000000 ] - /Resources 1 0 R - /Contents 2 0 R - /Parent 5 0 R - >> -endobj - -5 0 obj - << /Kids [ 4 0 R ] - /Count 1 - /Type /Pages - >> -endobj - -6 0 obj - << /Pages 5 0 R - /Type /Catalog - >> -endobj - -xref -0 7 -0000000000 65535 f -0000000010 00000 n -0000000034 00000 n -0000001775 00000 n -0000001798 00000 n -0000001971 00000 n -0000002045 00000 n -trailer -<< /ID [ (some) (id) ] - /Root 6 0 R - /Size 7 ->> -startxref -2104 -%%EOF \ No newline at end of file diff --git a/Session/Meta/Images.xcassets/Session/icon_mark_unread.imageset/Contents.json b/Session/Meta/Images.xcassets/Session/icon_mark_unread.imageset/Contents.json deleted file mode 100644 index 15f04e720..000000000 --- a/Session/Meta/Images.xcassets/Session/icon_mark_unread.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "filename" : "Group 1.pdf", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Session/Meta/Images.xcassets/Session/icon_mark_unread.imageset/Group 1.pdf b/Session/Meta/Images.xcassets/Session/icon_mark_unread.imageset/Group 1.pdf deleted file mode 100644 index ee5803cc0..000000000 --- a/Session/Meta/Images.xcassets/Session/icon_mark_unread.imageset/Group 1.pdf +++ /dev/null @@ -1,119 +0,0 @@ -%PDF-1.7 - -1 0 obj - << >> -endobj - -2 0 obj - << /Length 3 0 R >> -stream -/DeviceRGB CS -/DeviceRGB cs -q -1.000000 0.000000 -0.000000 1.000000 0.000000 0.000000 cm -1.000000 1.000000 1.000000 scn -2.787199 -0.000020 m -16.486496 -0.000020 l -18.115294 -0.000020 19.061613 0.946370 19.061613 2.759328 c -19.061613 9.586817 l -18.574244 9.380354 18.049170 9.293177 17.500172 9.318328 c -17.500172 2.805877 l -17.500172 1.982740 17.055578 1.575270 16.276453 1.575270 c -2.783631 1.575270 l -1.992093 1.575270 1.561486 1.982742 1.561486 2.812838 c -1.561486 12.095173 l -1.561486 12.916785 1.992093 13.325809 2.783631 13.325809 c -13.469756 13.325809 l -13.425384 13.865679 13.517972 14.419136 13.721417 14.901062 c -2.573595 14.901062 l -0.946341 14.901062 0.000000 13.961681 0.000000 12.148694 c -0.000000 2.759328 l -0.000000 0.939410 0.953309 -0.000020 2.787199 -0.000020 c -h -9.543965 5.139557 m -10.172357 5.139557 10.773123 5.402818 11.383170 6.002787 c -15.382624 9.937387 l -14.974646 10.187351 14.615897 10.528234 14.331102 10.912272 c -10.517039 7.147622 l -10.162351 6.794528 9.856965 6.640747 9.543965 6.640747 c -9.224007 6.640747 8.927103 6.794528 8.570965 7.147622 c -1.860897 13.775782 l -0.852536 12.740739 l -7.703311 6.002787 l -8.314881 5.401222 8.908615 5.139557 9.543965 5.139557 c -h -17.196671 1.166564 m -18.221004 2.188725 l -12.303679 8.048771 l -11.291525 7.022915 l -17.196671 1.166564 l -h -1.986481 1.267200 m -7.645381 6.878778 l -6.625601 7.895498 l -0.966048 2.286241 l -1.986481 1.267200 l -h -f -n -Q -q -1.000000 0.000000 -0.000000 1.000000 14.652039 10.501404 cm -1.000000 1.000000 1.000000 scn -2.929153 0.000005 m -4.535837 0.000005 5.865195 1.329370 5.865195 2.936068 c -5.865195 4.542760 4.535837 5.872131 2.929153 5.872131 c -1.322396 5.872131 0.000000 4.542760 0.000000 2.936068 c -0.000000 1.329370 1.322396 0.000005 2.929153 0.000005 c -h -f -n -Q - -endstream -endobj - -3 0 obj - 1758 -endobj - -4 0 obj - << /Annots [] - /Type /Page - /MediaBox [ 0.000000 0.000000 20.517242 16.373535 ] - /Resources 1 0 R - /Contents 2 0 R - /Parent 5 0 R - >> -endobj - -5 0 obj - << /Kids [ 4 0 R ] - /Count 1 - /Type /Pages - >> -endobj - -6 0 obj - << /Pages 5 0 R - /Type /Catalog - >> -endobj - -xref -0 7 -0000000000 65535 f -0000000010 00000 n -0000000034 00000 n -0000001848 00000 n -0000001871 00000 n -0000002044 00000 n -0000002118 00000 n -trailer -<< /ID [ (some) (id) ] - /Root 6 0 R - /Size 7 ->> -startxref -2177 -%%EOF \ No newline at end of file diff --git a/Session/Meta/Images.xcassets/Session/icon_mute.imageset/Contents.json b/Session/Meta/Images.xcassets/Session/icon_mute.imageset/Contents.json deleted file mode 100644 index 103f38787..000000000 --- a/Session/Meta/Images.xcassets/Session/icon_mute.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "filename" : "Group (1).pdf", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Session/Meta/Images.xcassets/Session/icon_mute.imageset/Group (1).pdf b/Session/Meta/Images.xcassets/Session/icon_mute.imageset/Group (1).pdf deleted file mode 100644 index 82f2ccb5f..000000000 --- a/Session/Meta/Images.xcassets/Session/icon_mute.imageset/Group (1).pdf +++ /dev/null @@ -1,108 +0,0 @@ -%PDF-1.7 - -1 0 obj - << >> -endobj - -2 0 obj - << /Length 3 0 R >> -stream -/DeviceRGB CS -/DeviceRGB cs -q -1.000000 0.000000 -0.000000 1.000000 1.777191 1.065613 cm -1.000000 1.000000 1.000000 scn -1.965486 4.165290 m -4.480973 4.165290 l -4.556003 4.165290 4.618963 4.140318 4.676248 4.090298 c -8.573530 0.603346 l -9.041570 0.191758 9.389591 0.000002 9.855134 0.000002 c -10.269597 0.000002 10.612472 0.202731 10.824432 0.550527 c -9.383916 1.983778 l -5.464605 5.521886 l -5.282459 5.686324 5.161677 5.726583 4.919939 5.726583 c -2.115349 5.726583 l -1.813488 5.726583 1.672305 5.869378 1.672305 6.162385 c -1.672305 9.702625 l -0.387879 10.985455 l -0.140821 10.674543 0.000000 10.221214 0.000000 9.624583 c -0.000000 6.215356 l -0.000000 4.840144 0.665267 4.165290 1.965486 4.165290 c -h -10.992882 5.767370 m -10.994472 14.682869 l -10.994472 15.337503 10.509784 15.863373 9.840604 15.863373 c -9.381418 15.863373 9.070704 15.660295 8.568763 15.214769 c -4.854671 11.916056 l -5.977557 10.789121 l -9.057764 13.588398 l -9.100519 13.631145 9.152128 13.654552 9.203737 13.654552 c -9.268968 13.654552 9.322166 13.608618 9.322166 13.527208 c -9.322166 7.441264 l -10.992882 5.767370 l -h -f -n -Q -q -1.000000 0.000000 -0.000000 1.000000 0.000107 -0.138275 cm -1.000000 1.000000 1.000000 scn -15.717578 0.344515 m -15.993180 0.070501 16.450928 0.068913 16.716087 0.344515 c -16.990101 0.625868 16.991690 1.067497 16.716087 1.341510 c -1.213316 16.844282 l -0.937698 17.119900 0.479934 17.119900 0.204318 16.844282 c --0.068106 16.577534 -0.068106 16.112497 0.204318 15.845750 c -15.717578 0.344515 l -h -f -n -Q - -endstream -endobj - -3 0 obj - 1493 -endobj - -4 0 obj - << /Annots [] - /Type /Page - /MediaBox [ 0.000000 0.000000 16.922302 18.003113 ] - /Resources 1 0 R - /Contents 2 0 R - /Parent 5 0 R - >> -endobj - -5 0 obj - << /Kids [ 4 0 R ] - /Count 1 - /Type /Pages - >> -endobj - -6 0 obj - << /Pages 5 0 R - /Type /Catalog - >> -endobj - -xref -0 7 -0000000000 65535 f -0000000010 00000 n -0000000034 00000 n -0000001583 00000 n -0000001606 00000 n -0000001779 00000 n -0000001853 00000 n -trailer -<< /ID [ (some) (id) ] - /Root 6 0 R - /Size 7 ->> -startxref -1912 -%%EOF \ No newline at end of file diff --git a/Session/Meta/Images.xcassets/Session/icon_pin.imageset/Contents.json b/Session/Meta/Images.xcassets/Session/icon_pin.imageset/Contents.json deleted file mode 100644 index 93044cb41..000000000 --- a/Session/Meta/Images.xcassets/Session/icon_pin.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "filename" : "Group.pdf", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Session/Meta/Images.xcassets/Session/icon_pin.imageset/Group.pdf b/Session/Meta/Images.xcassets/Session/icon_pin.imageset/Group.pdf deleted file mode 100644 index 401f1ec61..000000000 --- a/Session/Meta/Images.xcassets/Session/icon_pin.imageset/Group.pdf +++ /dev/null @@ -1,108 +0,0 @@ -%PDF-1.7 - -1 0 obj - << >> -endobj - -2 0 obj - << /Length 3 0 R >> -stream -/DeviceRGB CS -/DeviceRGB cs -q -1.000000 0.000000 -0.000000 1.000000 0.000061 0.000000 cm -1.000000 1.000000 1.000000 scn -5.862790 0.000008 m -6.062284 0.000008 6.593354 1.049471 6.593354 2.096780 c -6.593354 6.267460 l -5.127457 6.267460 l -5.127457 2.096780 l -5.127457 1.049471 5.658547 0.000008 5.862790 0.000008 c -h -1.157771 5.602798 m -10.563084 5.602798 l -11.267075 5.602798 11.720842 6.047764 11.720842 6.720025 c -11.720842 8.963408 9.209062 11.171642 5.862790 11.171642 c -2.511775 11.171642 0.000000 8.963408 0.000000 6.720025 c -0.000000 6.047764 0.453757 5.602798 1.157771 5.602798 c -h -1.497385 6.857010 m -1.346727 6.857010 1.281856 6.944154 1.308873 7.119138 c -1.488177 8.448398 3.233897 9.955872 5.862790 9.955872 c -8.486959 9.955872 10.232621 8.448398 10.411976 7.119138 c -10.438954 6.944154 10.374103 6.857010 10.223438 6.857010 c -1.497385 6.857010 l -h -0.942546 16.760296 m -0.942546 16.527699 1.038284 16.258003 1.240602 15.997648 c -1.617765 15.500992 2.499754 14.807369 3.452244 14.178015 c -3.174973 10.149855 l -4.498692 10.149855 l -4.777298 14.771296 l -4.784721 14.895235 4.761865 14.951048 4.667609 14.998844 c -3.659894 15.519547 2.877798 16.120106 2.762320 16.281898 c -2.701610 16.369028 2.752972 16.432411 2.831940 16.432411 c -8.888859 16.432411 l -8.967833 16.432411 9.019195 16.369028 8.958523 16.281898 c -8.843007 16.120106 8.060929 15.519547 7.053202 14.998844 c -6.965045 14.951048 6.936103 14.895235 6.949593 14.771296 c -7.222106 10.149855 l -8.545856 10.149855 l -8.268592 14.178015 l -9.227174 14.807369 10.103045 15.500992 10.480247 15.997648 c -10.688606 16.258003 10.784363 16.527699 10.784363 16.760296 c -10.784363 17.250416 10.407479 17.609772 9.853267 17.609772 c -1.873662 17.609772 l -1.313332 17.609772 0.942546 17.250416 0.942546 16.760296 c -h -f -n -Q - -endstream -endobj - -3 0 obj - 1770 -endobj - -4 0 obj - << /Annots [] - /Type /Page - /MediaBox [ 0.000000 0.000000 11.720917 18.003113 ] - /Resources 1 0 R - /Contents 2 0 R - /Parent 5 0 R - >> -endobj - -5 0 obj - << /Kids [ 4 0 R ] - /Count 1 - /Type /Pages - >> -endobj - -6 0 obj - << /Pages 5 0 R - /Type /Catalog - >> -endobj - -xref -0 7 -0000000000 65535 f -0000000010 00000 n -0000000034 00000 n -0000001860 00000 n -0000001883 00000 n -0000002056 00000 n -0000002130 00000 n -trailer -<< /ID [ (some) (id) ] - /Root 6 0 R - /Size 7 ->> -startxref -2189 -%%EOF \ No newline at end of file diff --git a/Session/Meta/Translations/de.lproj/Localizable.strings b/Session/Meta/Translations/de.lproj/Localizable.strings index 6be84d9be..4329dadc7 100644 --- a/Session/Meta/Translations/de.lproj/Localizable.strings +++ b/Session/Meta/Translations/de.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/en.lproj/Localizable.strings b/Session/Meta/Translations/en.lproj/Localizable.strings index 7b4de01eb..3b4ec22ee 100644 --- a/Session/Meta/Translations/en.lproj/Localizable.strings +++ b/Session/Meta/Translations/en.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/es.lproj/Localizable.strings b/Session/Meta/Translations/es.lproj/Localizable.strings index 531c4cd22..4bf349817 100644 --- a/Session/Meta/Translations/es.lproj/Localizable.strings +++ b/Session/Meta/Translations/es.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/fa.lproj/Localizable.strings b/Session/Meta/Translations/fa.lproj/Localizable.strings index 2a0170dc3..db8d61359 100644 --- a/Session/Meta/Translations/fa.lproj/Localizable.strings +++ b/Session/Meta/Translations/fa.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/fi.lproj/Localizable.strings b/Session/Meta/Translations/fi.lproj/Localizable.strings index d24651d21..d8b4a14b1 100644 --- a/Session/Meta/Translations/fi.lproj/Localizable.strings +++ b/Session/Meta/Translations/fi.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/fr.lproj/Localizable.strings b/Session/Meta/Translations/fr.lproj/Localizable.strings index beea8bef7..485829208 100644 --- a/Session/Meta/Translations/fr.lproj/Localizable.strings +++ b/Session/Meta/Translations/fr.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/hi.lproj/Localizable.strings b/Session/Meta/Translations/hi.lproj/Localizable.strings index 79f708099..954e74054 100644 --- a/Session/Meta/Translations/hi.lproj/Localizable.strings +++ b/Session/Meta/Translations/hi.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/hr.lproj/Localizable.strings b/Session/Meta/Translations/hr.lproj/Localizable.strings index f76e43cf6..59fe0f037 100644 --- a/Session/Meta/Translations/hr.lproj/Localizable.strings +++ b/Session/Meta/Translations/hr.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/id-ID.lproj/Localizable.strings b/Session/Meta/Translations/id-ID.lproj/Localizable.strings index 1f32b9335..d82fd6014 100644 --- a/Session/Meta/Translations/id-ID.lproj/Localizable.strings +++ b/Session/Meta/Translations/id-ID.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/it.lproj/Localizable.strings b/Session/Meta/Translations/it.lproj/Localizable.strings index 7d34972cf..32b1bfc72 100644 --- a/Session/Meta/Translations/it.lproj/Localizable.strings +++ b/Session/Meta/Translations/it.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/ja.lproj/Localizable.strings b/Session/Meta/Translations/ja.lproj/Localizable.strings index d548174c1..b2d5cf714 100644 --- a/Session/Meta/Translations/ja.lproj/Localizable.strings +++ b/Session/Meta/Translations/ja.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/nl.lproj/Localizable.strings b/Session/Meta/Translations/nl.lproj/Localizable.strings index c3acfc996..36a4ecf8d 100644 --- a/Session/Meta/Translations/nl.lproj/Localizable.strings +++ b/Session/Meta/Translations/nl.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/pl.lproj/Localizable.strings b/Session/Meta/Translations/pl.lproj/Localizable.strings index f9b3a16fe..9505b5df1 100644 --- a/Session/Meta/Translations/pl.lproj/Localizable.strings +++ b/Session/Meta/Translations/pl.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/pt_BR.lproj/Localizable.strings b/Session/Meta/Translations/pt_BR.lproj/Localizable.strings index 658cc1d23..2977aad75 100644 --- a/Session/Meta/Translations/pt_BR.lproj/Localizable.strings +++ b/Session/Meta/Translations/pt_BR.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/ru.lproj/Localizable.strings b/Session/Meta/Translations/ru.lproj/Localizable.strings index f650c8c4c..1f8cca0be 100644 --- a/Session/Meta/Translations/ru.lproj/Localizable.strings +++ b/Session/Meta/Translations/ru.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/si.lproj/Localizable.strings b/Session/Meta/Translations/si.lproj/Localizable.strings index 7af7c5365..76c4e66a8 100644 --- a/Session/Meta/Translations/si.lproj/Localizable.strings +++ b/Session/Meta/Translations/si.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/sk.lproj/Localizable.strings b/Session/Meta/Translations/sk.lproj/Localizable.strings index 2f6dc0039..582dd4281 100644 --- a/Session/Meta/Translations/sk.lproj/Localizable.strings +++ b/Session/Meta/Translations/sk.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/sv.lproj/Localizable.strings b/Session/Meta/Translations/sv.lproj/Localizable.strings index 481256826..e94364dcc 100644 --- a/Session/Meta/Translations/sv.lproj/Localizable.strings +++ b/Session/Meta/Translations/sv.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/th.lproj/Localizable.strings b/Session/Meta/Translations/th.lproj/Localizable.strings index 67f3f233e..1df1f2254 100644 --- a/Session/Meta/Translations/th.lproj/Localizable.strings +++ b/Session/Meta/Translations/th.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/vi-VN.lproj/Localizable.strings b/Session/Meta/Translations/vi-VN.lproj/Localizable.strings index f6d6d5f3e..47c54b0bd 100644 --- a/Session/Meta/Translations/vi-VN.lproj/Localizable.strings +++ b/Session/Meta/Translations/vi-VN.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings b/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings index 06a310228..43063bfee 100644 --- a/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings +++ b/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/Session/Meta/Translations/zh_CN.lproj/Localizable.strings b/Session/Meta/Translations/zh_CN.lproj/Localizable.strings index 9a14a5c83..815f05f54 100644 --- a/Session/Meta/Translations/zh_CN.lproj/Localizable.strings +++ b/Session/Meta/Translations/zh_CN.lproj/Localizable.strings @@ -616,3 +616,6 @@ "leave_group_confirmation_alert_title" = "Leave Group"; "leave_community_confirmation_alert_title" = "Leave Community"; "leave_community_confirmation_alert_message" = "Are you sure you want to leave %@?"; +"group_you_leaving" = "Leaving..."; +"group_leave_error" = "Failed to leave Group!"; +"group_unable_to_leave" = "Unable to leave the Group, please try again"; diff --git a/SessionMessagingKit/Database/Models/ControlMessageProcessRecord.swift b/SessionMessagingKit/Database/Models/ControlMessageProcessRecord.swift index c7cd38636..7540e35cc 100644 --- a/SessionMessagingKit/Database/Models/ControlMessageProcessRecord.swift +++ b/SessionMessagingKit/Database/Models/ControlMessageProcessRecord.swift @@ -151,7 +151,8 @@ internal extension ControlMessageProcessRecord { .infoClosedGroupCreated: return nil - case .infoClosedGroupUpdated, .infoClosedGroupCurrentUserLeft: + case .infoClosedGroupUpdated, .infoClosedGroupCurrentUserLeft, + .infoClosedGroupCurrentUserLeaving, .infoClosedGroupCurrentUserErrorLeaving: self.variant = .closedGroupControlMessage case .infoDisappearingMessagesUpdate: diff --git a/SessionMessagingKit/Database/Models/Interaction.swift b/SessionMessagingKit/Database/Models/Interaction.swift index fe244b8f0..2dcb64a82 100644 --- a/SessionMessagingKit/Database/Models/Interaction.swift +++ b/SessionMessagingKit/Database/Models/Interaction.swift @@ -73,6 +73,8 @@ public struct Interaction: Codable, Identifiable, Equatable, FetchableRecord, Mu case infoClosedGroupCreated = 1000 case infoClosedGroupUpdated case infoClosedGroupCurrentUserLeft + case infoClosedGroupCurrentUserLeaving + case infoClosedGroupCurrentUserErrorLeaving case infoDisappearingMessagesUpdate = 2000 @@ -87,7 +89,7 @@ public struct Interaction: Codable, Identifiable, Equatable, FetchableRecord, Mu public var isInfoMessage: Bool { switch self { - case .infoClosedGroupCreated, .infoClosedGroupUpdated, .infoClosedGroupCurrentUserLeft, + case .infoClosedGroupCreated, .infoClosedGroupUpdated, .infoClosedGroupCurrentUserLeft, .infoClosedGroupCurrentUserLeaving, .infoClosedGroupCurrentUserErrorLeaving, .infoDisappearingMessagesUpdate, .infoScreenshotNotification, .infoMediaSavedNotification, .infoMessageRequestAccepted, .infoCall: return true @@ -106,7 +108,7 @@ public struct Interaction: Codable, Identifiable, Equatable, FetchableRecord, Mu case .standardOutgoing, .standardIncomingDeleted: return false - case .infoClosedGroupCreated, .infoClosedGroupUpdated, .infoClosedGroupCurrentUserLeft, + case .infoClosedGroupCreated, .infoClosedGroupUpdated, .infoClosedGroupCurrentUserLeft, .infoClosedGroupCurrentUserLeaving, .infoClosedGroupCurrentUserErrorLeaving, .infoDisappearingMessagesUpdate, .infoScreenshotNotification, .infoMediaSavedNotification, .infoMessageRequestAccepted: return false @@ -846,6 +848,8 @@ public extension Interaction { case .infoClosedGroupCreated: return "GROUP_CREATED".localized() case .infoClosedGroupCurrentUserLeft: return "GROUP_YOU_LEFT".localized() + case .infoClosedGroupCurrentUserLeaving: return "group_you_leaving".localized() + case .infoClosedGroupCurrentUserErrorLeaving: return "group_leave_error".localized() case .infoClosedGroupUpdated: return (body ?? "GROUP_UPDATED".localized()) case .infoMessageRequestAccepted: return (body ?? "MESSAGE_REQUESTS_ACCEPTED".localized()) diff --git a/SessionMessagingKit/Sending & Receiving/Message Handling/MessageSender+ClosedGroups.swift b/SessionMessagingKit/Sending & Receiving/Message Handling/MessageSender+ClosedGroups.swift index 0d219b5b2..e565eaca0 100644 --- a/SessionMessagingKit/Sending & Receiving/Message Handling/MessageSender+ClosedGroups.swift +++ b/SessionMessagingKit/Sending & Receiving/Message Handling/MessageSender+ClosedGroups.swift @@ -493,7 +493,7 @@ extension MessageSender { let interaction: Interaction = try Interaction( threadId: thread.id, authorId: userPublicKey, - variant: .infoClosedGroupCurrentUserLeft, + variant: .infoClosedGroupCurrentUserLeaving, body: ClosedGroupControlMessage.Kind .memberLeft .infoMessage(db, sender: userPublicKey), @@ -529,6 +529,7 @@ extension MessageSender { publicKey: userPublicKey ) } + interaction.with() } .map { _ in } diff --git a/SessionUIKit/Utilities/UIContextualAction+Theming.swift b/SessionUIKit/Utilities/UIContextualAction+Theming.swift index 7ac0ae0fb..d16fdd9da 100644 --- a/SessionUIKit/Utilities/UIContextualAction+Theming.swift +++ b/SessionUIKit/Utilities/UIContextualAction+Theming.swift @@ -69,16 +69,10 @@ public extension UIContextualAction { stackView.spacing = 4 if let icon: UIImage = icon { + let scale: Double = iconHeight / icon.size.height let aspectRatio: CGFloat = (icon.size.width / icon.size.height) - let imageView: UIImageView = UIImageView( - image: icon.resizedImage( - to: CGSize( - width: iconHeight * aspectRatio, - height: iconHeight - ) - ) - ) - imageView.frame = CGRect(x: 0, y: 0, width: (iconHeight * aspectRatio), height: iconHeight) + let imageView: UIImageView = UIImageView(image: icon) + imageView.frame = CGRect(x: 0, y: 0, width: iconHeight * aspectRatio, height: iconHeight) imageView.contentMode = .scaleAspectFit imageView.themeTintColor = themeTintColor stackView.addArrangedSubview(imageView)