From a6699f0c585a9ed4143a9303df5e299c744280b4 Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Thu, 9 Mar 2023 15:46:45 +1100 Subject: [PATCH] Made a few small bug fixes & improvements Updated the conversation empty state to appear in all conversation types Recreating the interaction FTS table if it doesn't exist (somehow was removed from some of my DBs...) Fixed a couple of incorrect swipe action colours Fixed a few issues causing unneeded conversation cell layouts which could impact performance Fixed a bug where the in-conversation search loading indicator wouldn't disappear when pressing the clear button --- Session/Closed Groups/EditClosedGroupVC.swift | 2 +- .../Conversations/ConversationSearch.swift | 1 + Session/Conversations/ConversationVC.swift | 67 +++++-------------- .../MessageRequestsViewController.swift | 6 +- .../Translations/de.lproj/Localizable.strings | 2 +- .../Translations/en.lproj/Localizable.strings | 2 +- .../Translations/es.lproj/Localizable.strings | 2 +- .../Translations/fa.lproj/Localizable.strings | 2 +- .../Translations/fi.lproj/Localizable.strings | 2 +- .../Translations/fr.lproj/Localizable.strings | 2 +- .../Translations/hi.lproj/Localizable.strings | 2 +- .../Translations/hr.lproj/Localizable.strings | 2 +- .../id-ID.lproj/Localizable.strings | 2 +- .../Translations/it.lproj/Localizable.strings | 2 +- .../Translations/ja.lproj/Localizable.strings | 2 +- .../Translations/nl.lproj/Localizable.strings | 2 +- .../Translations/pl.lproj/Localizable.strings | 2 +- .../pt_BR.lproj/Localizable.strings | 2 +- .../Translations/ru.lproj/Localizable.strings | 2 +- .../Translations/si.lproj/Localizable.strings | 2 +- .../Translations/sk.lproj/Localizable.strings | 2 +- .../Translations/sv.lproj/Localizable.strings | 2 +- .../Translations/th.lproj/Localizable.strings | 2 +- .../vi-VN.lproj/Localizable.strings | 2 +- .../zh-Hant.lproj/Localizable.strings | 2 +- .../zh_CN.lproj/Localizable.strings | 2 +- .../Migrations/_012_SessionUtilChanges.swift | 12 ++++ 27 files changed, 57 insertions(+), 75 deletions(-) diff --git a/Session/Closed Groups/EditClosedGroupVC.swift b/Session/Closed Groups/EditClosedGroupVC.swift index 345f98d59..decd0b236 100644 --- a/Session/Closed Groups/EditClosedGroupVC.swift +++ b/Session/Closed Groups/EditClosedGroupVC.swift @@ -258,7 +258,7 @@ final class EditClosedGroupVC: BaseVC, UITableViewDataSource, UITableViewDelegat let delete: UIContextualAction = UIContextualAction( title: "GROUP_ACTION_REMOVE".localized(), icon: UIImage(named: "icon_bin"), - themeTintColor: .textPrimary, + themeTintColor: .white, themeBackgroundColor: .conversationButton_swipeDestructive, side: .trailing, actionIndex: 0, diff --git a/Session/Conversations/ConversationSearch.swift b/Session/Conversations/ConversationSearch.swift index c98e650f9..e62f2d2f2 100644 --- a/Session/Conversations/ConversationSearch.swift +++ b/Session/Conversations/ConversationSearch.swift @@ -317,6 +317,7 @@ public final class SearchResultsBar: UIView { label.text = "" downButton.isEnabled = false upButton.isEnabled = false + stopLoading() return } diff --git a/Session/Conversations/ConversationVC.swift b/Session/Conversations/ConversationVC.swift index 39a0014d9..e6c0c3ee9 100644 --- a/Session/Conversations/ConversationVC.swift +++ b/Session/Conversations/ConversationVC.swift @@ -162,6 +162,8 @@ final class ConversationVC: BaseVC, ConversationSearchControllerDelegate, UITabl result.register(view: InfoMessageCell.self) result.register(view: TypingIndicatorCell.self) result.register(view: CallMessageCell.self) + result.estimatedSectionHeaderHeight = ConversationVC.loadingHeaderHeight + result.sectionFooterHeight = 0 result.dataSource = self result.delegate = self @@ -209,7 +211,7 @@ final class ConversationVC: BaseVC, ConversationSearchControllerDelegate, UITabl private lazy var emptyStateLabel: UILabel = { let text: String = String( - format: "GROUP_CONVERSATION_EMPTY_STATE".localized(), + format: "CONVERSATION_EMPTY_STATE".localized(), self.viewModel.threadData.displayName ) @@ -228,10 +230,6 @@ final class ConversationVC: BaseVC, ConversationSearchControllerDelegate, UITabl result.textAlignment = .center result.lineBreakMode = .byWordWrapping result.numberOfLines = 0 - result.isHidden = ( - self.viewModel.threadData.threadVariant != .legacyGroup && - self.viewModel.threadData.threadVariant != .group - ) return result }() @@ -401,8 +399,8 @@ final class ConversationVC: BaseVC, ConversationSearchControllerDelegate, UITabl view.addSubview(messageRequestStackView) emptyStateLabel.pin(.top, to: .top, of: view, withInset: Values.largeSpacing) - emptyStateLabel.pin(.leading, to: .leading, of: view, withInset: Values.largeSpacing) - emptyStateLabel.pin(.trailing, to: .trailing, of: view, withInset: -Values.largeSpacing) + emptyStateLabel.pin(.leading, to: .leading, of: view, withInset: Values.veryLargeSpacing) + emptyStateLabel.pin(.trailing, to: .trailing, of: view, withInset: -Values.veryLargeSpacing) messageRequestStackView.addArrangedSubview(messageRequestBlockButton) messageRequestStackView.addArrangedSubview(messageRequestDescriptionContainerView) @@ -620,7 +618,9 @@ final class ConversationVC: BaseVC, ConversationSearchControllerDelegate, UITabl // PagedDatabaseObserver won't have them so we need to force a re-fetch of the current // data to ensure everything is up to date if didReturnFromBackground { - self?.viewModel.pagedDataObserver?.reload() + DispatchQueue.global(qos: .background).async { + self?.viewModel.pagedDataObserver?.reload() + } } } } @@ -674,7 +674,7 @@ final class ConversationVC: BaseVC, ConversationSearchControllerDelegate, UITabl // Update the empty state let text: String = String( - format: "GROUP_CONVERSATION_EMPTY_STATE".localized(), + format: "CONVERSATION_EMPTY_STATE".localized(), updatedThreadData.displayName ) emptyStateLabel.attributedText = NSAttributedString(string: text) @@ -775,6 +775,13 @@ final class ConversationVC: BaseVC, ConversationSearchControllerDelegate, UITabl changeset: StagedChangeset<[ConversationViewModel.SectionModel]>, initialLoad: Bool = false ) { + // Determine if we have any messages for the empty state + let hasMessages: Bool = (updatedData + .filter { $0.model == .messages } + .first? + .elements + .isEmpty == false) + // Ensure the first load or a load when returning from a child screen runs without // animations (if we don't do this the cells will animate in from a frame of // CGRect.zero or have a buggy transition) @@ -785,17 +792,7 @@ final class ConversationVC: BaseVC, ConversationSearchControllerDelegate, UITabl self.viewModel.updateInteractionData(updatedData) // Update the empty state - let hasMessages: Bool = (updatedData - .filter { $0.model == .messages } - .first? - .elements - .isEmpty == false) - self.emptyStateLabel.isHidden = ( - hasMessages || ( - self.viewModel.threadData.threadVariant != .legacyGroup && - self.viewModel.threadData.threadVariant != .group - ) - ) + self.emptyStateLabel.isHidden = hasMessages UIView.performWithoutAnimation { self.tableView.reloadData() @@ -806,12 +803,7 @@ final class ConversationVC: BaseVC, ConversationSearchControllerDelegate, UITabl } // Update the empty state - self.emptyStateLabel.isHidden = ( - !updatedData.isEmpty || ( - self.viewModel.threadData.threadVariant != .legacyGroup && - self.viewModel.threadData.threadVariant != .group - ) - ) + self.emptyStateLabel.isHidden = hasMessages // Update the ReactionListSheet (if one exists) if let messageUpdates: [MessageViewModel] = updatedData.first(where: { $0.model == .messages })?.elements { @@ -1428,14 +1420,6 @@ final class ConversationVC: BaseVC, ConversationSearchControllerDelegate, UITabl } // MARK: - UITableViewDelegate - - func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat { - return UITableView.automaticDimension - } - - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { - return UITableView.automaticDimension - } func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { let section: ConversationViewModel.SectionModel = viewModel.interactionData[section] @@ -1507,15 +1491,6 @@ final class ConversationVC: BaseVC, ConversationSearchControllerDelegate, UITabl return } - // Note: In this case we need to force a tableView layout to ensure updating the - // scroll position has the correct offset (otherwise there are some cases where - // the screen will jump up - eg. when sending a reply while the soft keyboard - // is visible) - UIView.performWithoutAnimation { - self.tableView.setNeedsLayout() - self.tableView.layoutIfNeeded() - } - let targetIndexPath: IndexPath = IndexPath( row: (self.viewModel.interactionData[messagesSectionIndex].elements.count - 1), section: messagesSectionIndex @@ -1762,12 +1737,6 @@ final class ConversationVC: BaseVC, ConversationSearchControllerDelegate, UITabl return } - // Note: If the tableView needs to layout then we should do it first without an animation - // to prevent an annoying issue where the screen jumps slightly after the scroll completes - UIView.performWithoutAnimation { - self.tableView.layoutIfNeeded() - } - let targetIndexPath: IndexPath = IndexPath( row: targetMessageIndex, section: messageSectionIndex diff --git a/Session/Home/Message Requests/MessageRequestsViewController.swift b/Session/Home/Message Requests/MessageRequestsViewController.swift index 0167aca1e..268878979 100644 --- a/Session/Home/Message Requests/MessageRequestsViewController.swift +++ b/Session/Home/Message Requests/MessageRequestsViewController.swift @@ -408,7 +408,7 @@ class MessageRequestsViewController: BaseVC, UITableViewDelegate, UITableViewDat let delete: UIContextualAction = UIContextualAction( title: "TXT_DELETE_TITLE".localized(), icon: UIImage(named: "icon_bin"), - themeTintColor: .textPrimary, + themeTintColor: .white, themeBackgroundColor: .conversationButton_swipeDestructive, side: .trailing, actionIndex: (threadVariant == .contact ? 1 : 0), @@ -428,8 +428,8 @@ class MessageRequestsViewController: BaseVC, UITableViewDelegate, UITableViewDat let block: UIContextualAction = UIContextualAction( title: "BLOCK_LIST_BLOCK_BUTTON".localized(), icon: UIImage(named: "table_ic_block"), - themeTintColor: .textPrimary, - themeBackgroundColor: .conversationButton_swipeDestructive, + themeTintColor: .white, + themeBackgroundColor: .conversationButton_swipeSecondary, side: .trailing, actionIndex: 0, indexPath: indexPath, diff --git a/Session/Meta/Translations/de.lproj/Localizable.strings b/Session/Meta/Translations/de.lproj/Localizable.strings index b92b9d79a..519a42b20 100644 --- a/Session/Meta/Translations/de.lproj/Localizable.strings +++ b/Session/Meta/Translations/de.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/en.lproj/Localizable.strings b/Session/Meta/Translations/en.lproj/Localizable.strings index 4b00d63ca..d2bb87bd7 100644 --- a/Session/Meta/Translations/en.lproj/Localizable.strings +++ b/Session/Meta/Translations/en.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/es.lproj/Localizable.strings b/Session/Meta/Translations/es.lproj/Localizable.strings index a960a8ef9..91484888d 100644 --- a/Session/Meta/Translations/es.lproj/Localizable.strings +++ b/Session/Meta/Translations/es.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/fa.lproj/Localizable.strings b/Session/Meta/Translations/fa.lproj/Localizable.strings index c909428cf..d764eb276 100644 --- a/Session/Meta/Translations/fa.lproj/Localizable.strings +++ b/Session/Meta/Translations/fa.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/fi.lproj/Localizable.strings b/Session/Meta/Translations/fi.lproj/Localizable.strings index 6be88f937..84c99f71c 100644 --- a/Session/Meta/Translations/fi.lproj/Localizable.strings +++ b/Session/Meta/Translations/fi.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/fr.lproj/Localizable.strings b/Session/Meta/Translations/fr.lproj/Localizable.strings index 200b528f8..67c8dda6a 100644 --- a/Session/Meta/Translations/fr.lproj/Localizable.strings +++ b/Session/Meta/Translations/fr.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/hi.lproj/Localizable.strings b/Session/Meta/Translations/hi.lproj/Localizable.strings index d02a780fc..cf6d01b55 100644 --- a/Session/Meta/Translations/hi.lproj/Localizable.strings +++ b/Session/Meta/Translations/hi.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/hr.lproj/Localizable.strings b/Session/Meta/Translations/hr.lproj/Localizable.strings index dc559901c..505787d9e 100644 --- a/Session/Meta/Translations/hr.lproj/Localizable.strings +++ b/Session/Meta/Translations/hr.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/id-ID.lproj/Localizable.strings b/Session/Meta/Translations/id-ID.lproj/Localizable.strings index 01696a223..e6f6ff426 100644 --- a/Session/Meta/Translations/id-ID.lproj/Localizable.strings +++ b/Session/Meta/Translations/id-ID.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/it.lproj/Localizable.strings b/Session/Meta/Translations/it.lproj/Localizable.strings index baf144a01..36c15a86f 100644 --- a/Session/Meta/Translations/it.lproj/Localizable.strings +++ b/Session/Meta/Translations/it.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/ja.lproj/Localizable.strings b/Session/Meta/Translations/ja.lproj/Localizable.strings index 5100121f5..92fdf76b8 100644 --- a/Session/Meta/Translations/ja.lproj/Localizable.strings +++ b/Session/Meta/Translations/ja.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/nl.lproj/Localizable.strings b/Session/Meta/Translations/nl.lproj/Localizable.strings index b487ef47f..885a4f8e6 100644 --- a/Session/Meta/Translations/nl.lproj/Localizable.strings +++ b/Session/Meta/Translations/nl.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/pl.lproj/Localizable.strings b/Session/Meta/Translations/pl.lproj/Localizable.strings index f6a87bc54..3282638c4 100644 --- a/Session/Meta/Translations/pl.lproj/Localizable.strings +++ b/Session/Meta/Translations/pl.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/pt_BR.lproj/Localizable.strings b/Session/Meta/Translations/pt_BR.lproj/Localizable.strings index 0840cdd50..ea550a3bd 100644 --- a/Session/Meta/Translations/pt_BR.lproj/Localizable.strings +++ b/Session/Meta/Translations/pt_BR.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/ru.lproj/Localizable.strings b/Session/Meta/Translations/ru.lproj/Localizable.strings index 52f2b7a6d..53e0b8003 100644 --- a/Session/Meta/Translations/ru.lproj/Localizable.strings +++ b/Session/Meta/Translations/ru.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/si.lproj/Localizable.strings b/Session/Meta/Translations/si.lproj/Localizable.strings index 041426c6c..4d5cdb2c3 100644 --- a/Session/Meta/Translations/si.lproj/Localizable.strings +++ b/Session/Meta/Translations/si.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/sk.lproj/Localizable.strings b/Session/Meta/Translations/sk.lproj/Localizable.strings index 2ffedda83..6db1a875d 100644 --- a/Session/Meta/Translations/sk.lproj/Localizable.strings +++ b/Session/Meta/Translations/sk.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/sv.lproj/Localizable.strings b/Session/Meta/Translations/sv.lproj/Localizable.strings index c7385b194..d8bf60419 100644 --- a/Session/Meta/Translations/sv.lproj/Localizable.strings +++ b/Session/Meta/Translations/sv.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/th.lproj/Localizable.strings b/Session/Meta/Translations/th.lproj/Localizable.strings index 5c4427c05..f9056d0ec 100644 --- a/Session/Meta/Translations/th.lproj/Localizable.strings +++ b/Session/Meta/Translations/th.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/vi-VN.lproj/Localizable.strings b/Session/Meta/Translations/vi-VN.lproj/Localizable.strings index 0b89fd2f2..1d7092db3 100644 --- a/Session/Meta/Translations/vi-VN.lproj/Localizable.strings +++ b/Session/Meta/Translations/vi-VN.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings b/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings index 30cfd9650..d25216d30 100644 --- a/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings +++ b/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/Session/Meta/Translations/zh_CN.lproj/Localizable.strings b/Session/Meta/Translations/zh_CN.lproj/Localizable.strings index da56b17ec..bfae91d61 100644 --- a/Session/Meta/Translations/zh_CN.lproj/Localizable.strings +++ b/Session/Meta/Translations/zh_CN.lproj/Localizable.strings @@ -613,5 +613,5 @@ "CONTACT_NICKNAME_PLACEHOLDER" = "Enter a name"; "MARK_AS_READ" = "Mark Read"; "MARK_AS_UNREAD" = "Mark Unread"; -"GROUP_CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; +"CONVERSATION_EMPTY_STATE" = "You have no messages from %@. Send a message to start the conversation!"; "USER_CONFIG_OUTDATED_WARNING" = "Some of your devices are using outdated versions. Syncing may be unreliable until they are updated."; diff --git a/SessionMessagingKit/Database/Migrations/_012_SessionUtilChanges.swift b/SessionMessagingKit/Database/Migrations/_012_SessionUtilChanges.swift index a4331fdf9..6a1285a38 100644 --- a/SessionMessagingKit/Database/Migrations/_012_SessionUtilChanges.swift +++ b/SessionMessagingKit/Database/Migrations/_012_SessionUtilChanges.swift @@ -160,6 +160,18 @@ enum _012_SessionUtilChanges: Migration { SessionThread.Columns.pinnedPriority.set(to: 1) ) + // There seems to have been an issue where the interaction FTS table might have been dropped + // so if it has we should recreate it + if try db.tableExists(Interaction.fullTextSearchTableName) == false { + try db.create(virtualTable: Interaction.fullTextSearchTableName, using: FTS5()) { t in + t.synchronize(withTable: Interaction.databaseTableName) + t.tokenizer = _001_InitialSetupMigration.fullTextSearchTokenizer + + t.column(Interaction.Columns.body.name) + t.column(Interaction.Columns.threadId.name) + } + } + // If we don't have an ed25519 key then no need to create cached dump data let userPublicKey: String = getUserHexEncodedPublicKey(db)