diff --git a/Session/Shared/ConversationCell.swift b/Session/Shared/ConversationCell.swift index 3150b60c6..760b2326f 100644 --- a/Session/Shared/ConversationCell.swift +++ b/Session/Shared/ConversationCell.swift @@ -239,7 +239,6 @@ final class ConversationCell : UITableViewCell { // Contact if threadViewModel.isGroupThread, let thread = threadViewModel.threadRecord as? TSGroupThread { displayNameLabel.attributedText = getHighlightedSnippet(snippet: getDisplayName(), searchText: normalizedSearchText, fontSize: Values.mediumFontSize) - bottomLabelStackView.isHidden = false let context: Contact.Context = thread.isOpenGroup ? .openGroup : .regular var rawSnippet: String = "" thread.groupModel.groupMemberIds.forEach{ id in @@ -252,7 +251,12 @@ final class ConversationCell : UITableViewCell { } } } - snippetLabel.attributedText = getHighlightedSnippet(snippet: rawSnippet, searchText: normalizedSearchText, fontSize: Values.smallFontSize) + if rawSnippet.isEmpty { + bottomLabelStackView.isHidden = true + } else { + bottomLabelStackView.isHidden = false + snippetLabel.attributedText = getHighlightedSnippet(snippet: rawSnippet, searchText: normalizedSearchText, fontSize: Values.smallFontSize) + } } else { displayNameLabel.attributedText = getHighlightedSnippet(snippet: getDisplayNameForSearch(threadViewModel.contactSessionID!), searchText: normalizedSearchText, fontSize: Values.mediumFontSize) bottomLabelStackView.isHidden = true diff --git a/SessionMessagingKit/Sending & Receiving/MessageReceiver+Handling.swift b/SessionMessagingKit/Sending & Receiving/MessageReceiver+Handling.swift index 1077a648c..4ef1d2895 100644 --- a/SessionMessagingKit/Sending & Receiving/MessageReceiver+Handling.swift +++ b/SessionMessagingKit/Sending & Receiving/MessageReceiver+Handling.swift @@ -417,11 +417,7 @@ extension MessageReceiver { // Use the same identifier for notifications when in backgroud polling to prevent spam let notificationIdentifier = isBackgroundPoll ? thread.uniqueId : UUID().uuidString tsIncomingMessage.setNotificationIdentifier(notificationIdentifier, transaction: transaction) - DispatchQueue.main.async { - Storage.read { transaction in - SSKEnvironment.shared.notificationsManager!.notifyUser(for: tsIncomingMessage, in: thread, transaction: transaction) - } - } + SSKEnvironment.shared.notificationsManager!.notifyUser(for: tsIncomingMessage, in: thread, transaction: transaction) return tsMessageID } diff --git a/SessionNotificationServiceExtension/NSENotificationPresenter.swift b/SessionNotificationServiceExtension/NSENotificationPresenter.swift index ea04e9975..2d0b658f1 100644 --- a/SessionNotificationServiceExtension/NSENotificationPresenter.swift +++ b/SessionNotificationServiceExtension/NSENotificationPresenter.swift @@ -86,6 +86,7 @@ public class NSENotificationPresenter: NSObject, NotificationsProtocol { // If it's a message request then overwrite the body to be something generic (only show a notification // when receiving a new message request if there aren't any others or the user had hidden them) if thread.isMessageRequest() { + notificationContent.title = "Session" notificationContent.body = "MESSAGE_REQUESTS_NOTIFICATION".localized() }