diff --git a/Session/Home/HomeVC.swift b/Session/Home/HomeVC.swift index 522a54db9..c97c01ef2 100644 --- a/Session/Home/HomeVC.swift +++ b/Session/Home/HomeVC.swift @@ -627,7 +627,45 @@ final class HomeVC: BaseVC, UITableViewDataSource, UITableViewDelegate, SeedRemi return nil case .threads: let threadViewModel: SessionThreadViewModel = section.elements[indexPath.row] - return UISwipeActionsConfiguration(actions: [ ]) + 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, + themeTintColor: .textPrimary, + themeBackgroundColor: .conversationButton_swipeDestructive, + side: .trailing, + actionIndex: 0, + indexPath: indexPath, + tableView: tableView + ) { _, _, completionHandler in + (tableView.cellForRow(at: indexPath) as? FullConversationCell)?.optimisticUpdate( + hasUnread: !hasUnread + ) + completionHandler(true) + + // Delay the change to give the cell "unswipe" animation some time to complete + DispatchQueue.global(qos: .default).asyncAfter(deadline: .now() + unswipeAnimationDelay) { + Storage.shared.writeAsync { db in + if hasUnread { + try Interaction.markAsRead( + db, + interactionId: threadViewModel.interactionId, + threadId: threadViewModel.threadId, + threadVariant: threadViewModel.threadVariant, + includingOlder: true, + trySendReadReceipt: true + ) + } else { + try Interaction + .filter(id: threadViewModel.interactionId) + .updateAll(db, Interaction.Columns.wasRead.set(to: false)) + } + } + } + } + mark.themeBackgroundColor = .conversationButton_swipeSecondary + return UISwipeActionsConfiguration(actions: [ mark ]) default: return nil } } @@ -648,51 +686,17 @@ final class HomeVC: BaseVC, UITableViewDataSource, UITableViewDelegate, SeedRemi case .threads: let threadViewModel: SessionThreadViewModel = section.elements[indexPath.row] - let delete: UIContextualAction = UIContextualAction( - title: "TXT_DELETE_TITLE".localized(), - icon: UIImage(named: "icon_bin"), - iconHeight: 5, + + let pin: UIContextualAction = UIContextualAction( + title: (threadViewModel.threadIsPinned ? "UNPIN_BUTTON_TEXT".localized() : "PIN_BUTTON_TEXT".localized()), + icon: UIImage(named: "icon_pin"), + iconHeight: Values.mediumFontSize, themeTintColor: .textPrimary, themeBackgroundColor: .conversationButton_swipeDestructive, side: .trailing, - actionIndex: 2, + actionIndex: 0, indexPath: indexPath, tableView: tableView - ) { [weak self] _, _, completionHandler in - let confirmationModal: ConfirmationModal = ConfirmationModal( - info: ConfirmationModal.Info( - title: "CONVERSATION_DELETE_CONFIRMATION_ALERT_TITLE".localized(), - explanation: (threadViewModel.currentUserIsClosedGroupAdmin == true ? - "admin_group_leave_warning".localized() : - "CONVERSATION_DELETE_CONFIRMATION_ALERT_MESSAGE".localized() - ), - confirmTitle: "TXT_DELETE_TITLE".localized(), - confirmStyle: .danger, - cancelStyle: .alert_text, - dismissOnConfirm: true, - onConfirm: { [weak self] _ in - self?.viewModel.delete( - threadId: threadViewModel.threadId, - threadVariant: threadViewModel.threadVariant - ) - self?.dismiss(animated: true, completion: nil) - - completionHandler(true) - }, - afterClosed: { completionHandler(false) } - ) - ) - - self?.present(confirmationModal, animated: true, completion: nil) - } - delete.themeBackgroundColor = .conversationButton_swipeDestructive - - let pin: UIContextualAction = UIContextualAction( - style: .normal, - title: (threadViewModel.threadIsPinned ? - "UNPIN_BUTTON_TEXT".localized() : - "PIN_BUTTON_TEXT".localized() - ) ) { _, _, completionHandler in (tableView.cellForRow(at: indexPath) as? FullConversationCell)?.optimisticUpdate( isPinned: !threadViewModel.threadIsPinned @@ -709,47 +713,154 @@ final class HomeVC: BaseVC, UITableViewDataSource, UITableViewDelegate, SeedRemi } } pin.themeBackgroundColor = .conversationButton_swipeTertiary - - guard threadViewModel.threadVariant == .contact && !threadViewModel.threadIsNoteToSelf else { - return UISwipeActionsConfiguration(actions: [ delete, pin ]) - } - - let block: UIContextualAction = UIContextualAction( - style: .normal, - title: (threadViewModel.threadIsBlocked == true ? - "BLOCK_LIST_UNBLOCK_BUTTON".localized() : - "BLOCK_LIST_BLOCK_BUTTON".localized() - ) + + let mute: UIContextualAction = UIContextualAction( + title: ((threadViewModel.threadMutedUntilTimestamp != nil) ? "unmute_button_text".localized() : "mute_button_text".localized()), + icon: UIImage(named: "icon_mute"), + iconHeight: Values.mediumFontSize, + themeTintColor: .textPrimary, + themeBackgroundColor: .conversationButton_swipeDestructive, + side: .trailing, + actionIndex: 1, + indexPath: indexPath, + tableView: tableView ) { _, _, completionHandler in (tableView.cellForRow(at: indexPath) as? FullConversationCell)?.optimisticUpdate( - isBlocked: (threadViewModel.threadIsBlocked == false) + isMuted: !(threadViewModel.threadMutedUntilTimestamp != nil) ) completionHandler(true) // Delay the change to give the cell "unswipe" animation some time to complete DispatchQueue.global(qos: .default).asyncAfter(deadline: .now() + unswipeAnimationDelay) { Storage.shared.writeAsync { db in - try Contact + let currentValue: TimeInterval? = try SessionThread + .filter(id: threadViewModel.threadId) + .select(.mutedUntilTimestamp) + .asRequest(of: TimeInterval.self) + .fetchOne(db) + + try SessionThread .filter(id: threadViewModel.threadId) .updateAll( db, - Contact.Columns.isBlocked.set( - to: (threadViewModel.threadIsBlocked == false ? - true: - false + SessionThread.Columns.mutedUntilTimestamp.set( + to: (currentValue == nil ? + Date.distantFuture.timeIntervalSince1970 : + nil ) ) ) - - try MessageSender.syncConfiguration(db, forceSyncNow: true) - .retainUntilComplete() } } } - block.themeBackgroundColor = .conversationButton_swipeSecondary - - return UISwipeActionsConfiguration(actions: [ delete, block, pin ]) - + mute.themeBackgroundColor = .conversationButton_swipeSecondary + + switch threadViewModel.threadVariant { + case .contact: + let delete: UIContextualAction = UIContextualAction( + title: "TXT_DELETE_TITLE".localized(), + icon: UIImage(named: "icon_bin"), + iconHeight: Values.smallFontSize, + themeTintColor: .textPrimary, + themeBackgroundColor: .conversationButton_swipeDestructive, + side: .trailing, + actionIndex: 2, + indexPath: indexPath, + tableView: tableView + ) { [weak self] _, _, completionHandler in + let confirmationModal: ConfirmationModal = ConfirmationModal( + info: ConfirmationModal.Info( + title: "CONVERSATION_DELETE_CONFIRMATION_ALERT_TITLE".localized(), + explanation: (threadViewModel.currentUserIsClosedGroupAdmin == true ? + "admin_group_leave_warning".localized() : + "CONVERSATION_DELETE_CONFIRMATION_ALERT_MESSAGE".localized() + ), + confirmTitle: "TXT_DELETE_TITLE".localized(), + confirmStyle: .danger, + cancelStyle: .alert_text, + dismissOnConfirm: true, + onConfirm: { [weak self] _ in + self?.viewModel.delete( + threadId: threadViewModel.threadId, + threadVariant: threadViewModel.threadVariant + ) + self?.dismiss(animated: true, completion: nil) + + completionHandler(true) + }, + afterClosed: { completionHandler(false) } + ) + ) + + self?.present(confirmationModal, animated: true, completion: nil) + } + delete.themeBackgroundColor = .conversationButton_swipeDestructive + + return UISwipeActionsConfiguration(actions: [ delete, mute, pin ]) + + case .openGroup, .closedGroup: + let leave: UIContextualAction = UIContextualAction( + title: "LEAVE_BUTTON_TITLE".localized(), + icon: UIImage(named: "icon_leave"), + iconHeight: Values.mediumFontSize, + themeTintColor: .textPrimary, + themeBackgroundColor: .conversationButton_swipeDestructive, + side: .trailing, + actionIndex: 2, + indexPath: indexPath, + tableView: tableView + ) { [weak self] _, _, completionHandler in + let confirmationModalTitle: String = (threadViewModel.threadVariant == .closedGroup) ? + "leave_group_confirmation_alert_title".localized() : + "leave_community_confirmation_alert_title".localized() + + let confirmationModalExplanation: NSAttributedString = { + if threadViewModel.threadVariant == .closedGroup && threadViewModel.currentUserIsClosedGroupAdmin == true { + return NSAttributedString(string: "admin_group_leave_warning".localized()) + } + + let mutableAttributedString = NSMutableAttributedString( + string: String( + format: "leave_community_confirmation_alert_message".localized(), + threadViewModel.displayName + ) + ) + mutableAttributedString.addAttribute( + .font, + value: UIFont.boldSystemFont(ofSize: Values.smallFontSize), + range: (mutableAttributedString.string as NSString).range(of: threadViewModel.displayName) + ) + return mutableAttributedString + }() + + let confirmationModal: ConfirmationModal = ConfirmationModal( + info: ConfirmationModal.Info( + title: confirmationModalTitle, + attributedExplanation: confirmationModalExplanation, + confirmTitle: "LEAVE_BUTTON_TITLE".localized(), + confirmStyle: .danger, + cancelStyle: .alert_text, + dismissOnConfirm: true, + onConfirm: { [weak self] _ in + self?.viewModel.delete( + threadId: threadViewModel.threadId, + threadVariant: threadViewModel.threadVariant + ) + self?.dismiss(animated: true, completion: nil) + + completionHandler(true) + }, + afterClosed: { completionHandler(false) } + ) + ) + + self?.present(confirmationModal, animated: true, completion: nil) + } + leave.themeBackgroundColor = .conversationButton_swipeDestructive + + return UISwipeActionsConfiguration(actions: [ leave, mute, pin ]) + } + default: return nil } } diff --git a/Session/Meta/Images.xcassets/Session/icon_leave.imageset/Contents.json b/Session/Meta/Images.xcassets/Session/icon_leave.imageset/Contents.json new file mode 100644 index 000000000..ab1509796 --- /dev/null +++ b/Session/Meta/Images.xcassets/Session/icon_leave.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "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 new file mode 100644 index 000000000..ad9dca31b --- /dev/null +++ b/Session/Meta/Images.xcassets/Session/icon_leave.imageset/Group 21.pdf @@ -0,0 +1,115 @@ +%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 new file mode 100644 index 000000000..c6f97a05d --- /dev/null +++ b/Session/Meta/Images.xcassets/Session/icon_mark_read.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "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 new file mode 100644 index 000000000..1c44b148b --- /dev/null +++ b/Session/Meta/Images.xcassets/Session/icon_mark_read.imageset/Vector.pdf @@ -0,0 +1,115 @@ +%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 new file mode 100644 index 000000000..15f04e720 --- /dev/null +++ b/Session/Meta/Images.xcassets/Session/icon_mark_unread.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "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 new file mode 100644 index 000000000..ee5803cc0 --- /dev/null +++ b/Session/Meta/Images.xcassets/Session/icon_mark_unread.imageset/Group 1.pdf @@ -0,0 +1,119 @@ +%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 new file mode 100644 index 000000000..103f38787 --- /dev/null +++ b/Session/Meta/Images.xcassets/Session/icon_mute.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "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 new file mode 100644 index 000000000..82f2ccb5f --- /dev/null +++ b/Session/Meta/Images.xcassets/Session/icon_mute.imageset/Group (1).pdf @@ -0,0 +1,108 @@ +%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 new file mode 100644 index 000000000..93044cb41 --- /dev/null +++ b/Session/Meta/Images.xcassets/Session/icon_pin.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "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 new file mode 100644 index 000000000..401f1ec61 --- /dev/null +++ b/Session/Meta/Images.xcassets/Session/icon_pin.imageset/Group.pdf @@ -0,0 +1,108 @@ +%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 21f699aca..6be84d9be 100644 --- a/Session/Meta/Translations/de.lproj/Localizable.strings +++ b/Session/Meta/Translations/de.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/en.lproj/Localizable.strings b/Session/Meta/Translations/en.lproj/Localizable.strings index 9bef16abf..7b4de01eb 100644 --- a/Session/Meta/Translations/en.lproj/Localizable.strings +++ b/Session/Meta/Translations/en.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/es.lproj/Localizable.strings b/Session/Meta/Translations/es.lproj/Localizable.strings index bfb99bd79..531c4cd22 100644 --- a/Session/Meta/Translations/es.lproj/Localizable.strings +++ b/Session/Meta/Translations/es.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/fa.lproj/Localizable.strings b/Session/Meta/Translations/fa.lproj/Localizable.strings index 262854bfe..2a0170dc3 100644 --- a/Session/Meta/Translations/fa.lproj/Localizable.strings +++ b/Session/Meta/Translations/fa.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/fi.lproj/Localizable.strings b/Session/Meta/Translations/fi.lproj/Localizable.strings index 8b1b9a3c5..d24651d21 100644 --- a/Session/Meta/Translations/fi.lproj/Localizable.strings +++ b/Session/Meta/Translations/fi.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/fr.lproj/Localizable.strings b/Session/Meta/Translations/fr.lproj/Localizable.strings index 28b5ba47f..beea8bef7 100644 --- a/Session/Meta/Translations/fr.lproj/Localizable.strings +++ b/Session/Meta/Translations/fr.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/hi.lproj/Localizable.strings b/Session/Meta/Translations/hi.lproj/Localizable.strings index ff4d5d873..79f708099 100644 --- a/Session/Meta/Translations/hi.lproj/Localizable.strings +++ b/Session/Meta/Translations/hi.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/hr.lproj/Localizable.strings b/Session/Meta/Translations/hr.lproj/Localizable.strings index d5f5b0a94..f76e43cf6 100644 --- a/Session/Meta/Translations/hr.lproj/Localizable.strings +++ b/Session/Meta/Translations/hr.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/id-ID.lproj/Localizable.strings b/Session/Meta/Translations/id-ID.lproj/Localizable.strings index effc945b5..1f32b9335 100644 --- a/Session/Meta/Translations/id-ID.lproj/Localizable.strings +++ b/Session/Meta/Translations/id-ID.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/it.lproj/Localizable.strings b/Session/Meta/Translations/it.lproj/Localizable.strings index 766457324..7d34972cf 100644 --- a/Session/Meta/Translations/it.lproj/Localizable.strings +++ b/Session/Meta/Translations/it.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/ja.lproj/Localizable.strings b/Session/Meta/Translations/ja.lproj/Localizable.strings index 798f4bac9..d548174c1 100644 --- a/Session/Meta/Translations/ja.lproj/Localizable.strings +++ b/Session/Meta/Translations/ja.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/nl.lproj/Localizable.strings b/Session/Meta/Translations/nl.lproj/Localizable.strings index 0a39aa25c..c3acfc996 100644 --- a/Session/Meta/Translations/nl.lproj/Localizable.strings +++ b/Session/Meta/Translations/nl.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/pl.lproj/Localizable.strings b/Session/Meta/Translations/pl.lproj/Localizable.strings index be530b2f2..f9b3a16fe 100644 --- a/Session/Meta/Translations/pl.lproj/Localizable.strings +++ b/Session/Meta/Translations/pl.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/pt_BR.lproj/Localizable.strings b/Session/Meta/Translations/pt_BR.lproj/Localizable.strings index c61ecd667..658cc1d23 100644 --- a/Session/Meta/Translations/pt_BR.lproj/Localizable.strings +++ b/Session/Meta/Translations/pt_BR.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/ru.lproj/Localizable.strings b/Session/Meta/Translations/ru.lproj/Localizable.strings index d683c3892..f650c8c4c 100644 --- a/Session/Meta/Translations/ru.lproj/Localizable.strings +++ b/Session/Meta/Translations/ru.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/si.lproj/Localizable.strings b/Session/Meta/Translations/si.lproj/Localizable.strings index ef161ff64..7af7c5365 100644 --- a/Session/Meta/Translations/si.lproj/Localizable.strings +++ b/Session/Meta/Translations/si.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/sk.lproj/Localizable.strings b/Session/Meta/Translations/sk.lproj/Localizable.strings index 4b023ae1e..2f6dc0039 100644 --- a/Session/Meta/Translations/sk.lproj/Localizable.strings +++ b/Session/Meta/Translations/sk.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/sv.lproj/Localizable.strings b/Session/Meta/Translations/sv.lproj/Localizable.strings index 066e5ba5d..481256826 100644 --- a/Session/Meta/Translations/sv.lproj/Localizable.strings +++ b/Session/Meta/Translations/sv.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/th.lproj/Localizable.strings b/Session/Meta/Translations/th.lproj/Localizable.strings index cafa26215..67f3f233e 100644 --- a/Session/Meta/Translations/th.lproj/Localizable.strings +++ b/Session/Meta/Translations/th.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/vi-VN.lproj/Localizable.strings b/Session/Meta/Translations/vi-VN.lproj/Localizable.strings index 0b2bc8a02..f6d6d5f3e 100644 --- a/Session/Meta/Translations/vi-VN.lproj/Localizable.strings +++ b/Session/Meta/Translations/vi-VN.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings b/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings index 9f4292ed6..06a310228 100644 --- a/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings +++ b/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Meta/Translations/zh_CN.lproj/Localizable.strings b/Session/Meta/Translations/zh_CN.lproj/Localizable.strings index 164c814da..9a14a5c83 100644 --- a/Session/Meta/Translations/zh_CN.lproj/Localizable.strings +++ b/Session/Meta/Translations/zh_CN.lproj/Localizable.strings @@ -609,3 +609,10 @@ "context_menu_resync" = "Resync"; "GIPHY_PERMISSION_TITLE" = "Search GIFs?"; "GIPHY_PERMISSION_MESSAGE" = "Session will connect to Giphy to provide search results. You will not have full metadata protection when sending GIFs."; +"mute_button_text" = "Mute"; +"unmute_button_text" = "Unmute"; +"mark_read_button_text" = "Mark read"; +"mark_unread_button_text" = "Mark unread"; +"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 %@?"; diff --git a/Session/Shared/FullConversationCell.swift b/Session/Shared/FullConversationCell.swift index 11fa90c97..9ab4b39fa 100644 --- a/Session/Shared/FullConversationCell.swift +++ b/Session/Shared/FullConversationCell.swift @@ -346,7 +346,7 @@ public final class FullConversationCell: UITableViewCell { } else { accentLineView.themeBackgroundColor = .conversationButton_unreadStripBackground - accentLineView.alpha = (unreadCount > 0 ? 1 : 0.0001) // Setting the alpha to exactly 0 causes an issue on iOS 12 + accentLineView.alpha = (unreadCount > 0 ? 1 : 0) } isPinnedIcon.isHidden = !cellViewModel.threadIsPinned @@ -406,23 +406,33 @@ public final class FullConversationCell: UITableViewCell { } public func optimisticUpdate( - isBlocked: Bool? = nil, - isPinned: Bool? = nil + isMuted: Bool? = nil, + isPinned: Bool? = nil, + hasUnread: Bool? = nil ) { - if let isBlocked: Bool = isBlocked { - if isBlocked { - accentLineView.themeBackgroundColor = .danger - accentLineView.alpha = 1 - } - else { - accentLineView.themeBackgroundColor = .conversationButton_unreadStripBackground - accentLineView.alpha = (!unreadCountView.isHidden ? 1 : 0.0001) // Setting the alpha to exactly 0 causes an issue on iOS 12 + if let isMuted: Bool = isMuted { + if isMuted { + + } else { + } } if let isPinned: Bool = isPinned { isPinnedIcon.isHidden = !isPinned } + + if let hasUnread: Bool = hasUnread { + if hasUnread { + unreadCountView.isHidden = false + unreadCountLabel.text = "1" + unreadCountLabel.font = .boldSystemFont(ofSize: Values.verySmallFontSize) + accentLineView.alpha = 1 + } else { + unreadCountView.isHidden = true + accentLineView.alpha = 0 + } + } } // MARK: - Snippet generation diff --git a/SessionUIKit/Utilities/UIContextualAction+Theming.swift b/SessionUIKit/Utilities/UIContextualAction+Theming.swift index 99e563e97..7ac0ae0fb 100644 --- a/SessionUIKit/Utilities/UIContextualAction+Theming.swift +++ b/SessionUIKit/Utilities/UIContextualAction+Theming.swift @@ -66,11 +66,18 @@ public extension UIContextualAction { let stackView: UIStackView = UIStackView() stackView.axis = .vertical stackView.alignment = .center - stackView.spacing = 3 + stackView.spacing = 4 if let icon: UIImage = icon { let aspectRatio: CGFloat = (icon.size.width / icon.size.height) - let imageView: UIImageView = UIImageView(image: icon) + 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) imageView.contentMode = .scaleAspectFit imageView.themeTintColor = themeTintColor