mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
8ff542405c
Updated the migrations to indicate progress (Potential to base progress for the "processing" sections on the file size of the legacy database) Updated the JobRunner to properly support concurrent queues for sending/receiving (other queues are still serial) Added the typing indicator logic into the ConversationVC Put code into SUKLegacy for connecting to the YDB database Fixed a couple of minor UI bugs with the GalleryRailView Updated the media gallery selection screen to use the appropriate system theme colouring (was painful to randomly swap from dark mode to like for one screen...) Added an alert for when the database migration fails Deleted the legacy migrations (manually applying any unapplied changes as part of the YDB to GRDB migration process)
30 lines
1.2 KiB
Swift
30 lines
1.2 KiB
Swift
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
||
|
||
import Foundation
|
||
import GRDB
|
||
import SessionUtilitiesKit
|
||
|
||
/// This record is created for an incoming typing indicator message
|
||
///
|
||
/// **Note:** Currently we only support typing indicator on contact thread (one-to-one), to support groups we would need
|
||
/// to change the structure of this table (since it’s primary key is the threadId)
|
||
public struct ThreadTypingIndicator: Codable, FetchableRecord, PersistableRecord, TableRecord, ColumnExpressible {
|
||
public static var databaseTableName: String { "threadTypingIndicator" }
|
||
internal static let threadForeignKey = ForeignKey([Columns.threadId], to: [SessionThread.Columns.id])
|
||
private static let thread = belongsTo(SessionThread.self, using: threadForeignKey)
|
||
|
||
public typealias Columns = CodingKeys
|
||
public enum CodingKeys: String, CodingKey, ColumnExpression {
|
||
case threadId
|
||
case timestampMs
|
||
}
|
||
|
||
public let threadId: String
|
||
public let timestampMs: Int64
|
||
|
||
// MARK: - Relationships
|
||
|
||
public var thread: QueryInterfaceRequest<SessionThread> {
|
||
request(for: ThreadTypingIndicator.thread)
|
||
}
|
||
}
|