mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.1 KiB
Swift
38 lines
1.1 KiB
Swift
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
|
|
|
import Foundation
|
|
import SessionMessagingKit
|
|
|
|
public struct ThreadViewModel: Equatable {
|
|
public let thread: SessionThread
|
|
public let name: String
|
|
public let unreadCount: UInt
|
|
public let unreadMentionCount: UInt
|
|
|
|
public let lastInteraction: Interaction?
|
|
public let lastInteractionDate: Date
|
|
public let lastInteractionText: String?
|
|
public let lastInteractionState: RecipientState.State?
|
|
|
|
public init(
|
|
thread: SessionThread,
|
|
name: String,
|
|
unreadCount: UInt,
|
|
unreadMentionCount: UInt,
|
|
lastInteraction: Interaction?,
|
|
lastInteractionDate: Date,
|
|
lastInteractionText: String?,
|
|
lastInteractionState: RecipientState.State?
|
|
) {
|
|
self.thread = thread
|
|
self.name = name
|
|
self.unreadCount = unreadCount
|
|
self.unreadMentionCount = unreadMentionCount
|
|
|
|
self.lastInteraction = lastInteraction
|
|
self.lastInteractionDate = lastInteractionDate
|
|
self.lastInteractionText = lastInteractionText
|
|
self.lastInteractionState = lastInteractionState
|
|
}
|
|
}
|