commit
20f99df0be
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue