// // Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only // import Foundation public protocol DatabaseChanges { typealias UniqueId = String typealias RowId = Int64 var threadUniqueIds: Set { get } /// Unique ids for threads that have been changed in a user-facing way /// that should affect the chat list UI. var threadUniqueIdsForChatListUpdate: Set { get } var interactionUniqueIds: Set { get } var storyMessageUniqueIds: Set { get } var storyMessageRowIds: Set { get } var interactionDeletedUniqueIds: Set { get } var storyMessageDeletedUniqueIds: Set { get } var tableNames: Set { get } var tableRowIds: [String: Set] { get } var didUpdateInteractions: Bool { get } var didUpdateThreads: Bool { get } func didUpdate(tableName: String) -> Bool func didUpdate(interaction: TSInteraction) -> Bool func didUpdate(thread: TSThread) -> Bool }