Replace threadId with ThreadParameters

This commit is contained in:
ismailgulek
2021-11-29 18:11:04 +03:00
parent 9142f3ca1d
commit d6ffe933d2
6 changed files with 28 additions and 10 deletions
@@ -16,6 +16,24 @@
import Foundation
@objcMembers
class ThreadParameters: NSObject {
/// If not nil, the thread will be opened on this room
let threadId: String
/// If true, related room screen will be stacked in the navigation stack
let stackRoomScreen: Bool
init(threadId: String,
stackRoomScreen: Bool) {
self.threadId = threadId
self.stackRoomScreen = stackRoomScreen
super.init()
}
}
/// Navigation parameters to display a room with a provided identifier in a specific matrix session.
@objcMembers
class RoomNavigationParameters: NSObject {
@@ -25,29 +43,29 @@ class RoomNavigationParameters: NSObject {
/// The room identifier
let roomId: String
/// If not nil, the thread will be opened on this room
let threadId: String?
/// If not nil, the room will be opened on this event.
let eventId: String?
/// The Matrix session in which the room should be available.
let mxSession: MXSession
/// Navigation parameters for a thread
let threadParameters: ThreadParameters?
/// Screen presentation parameters.
let presentationParameters: ScreenPresentationParameters
// MARK: - Setup
init(roomId: String,
threadId: String?,
eventId: String?,
mxSession: MXSession,
threadParameters: ThreadParameters?,
presentationParameters: ScreenPresentationParameters) {
self.roomId = roomId
self.threadId = threadId
self.eventId = eventId
self.mxSession = mxSession
self.threadParameters = threadParameters
self.presentationParameters = presentationParameters
super.init()