Persist log and connection search state across tabs

This commit is contained in:
世界
2026-03-06 10:09:56 +08:00
parent 0636b47d36
commit c7e1f667c3
4 changed files with 18 additions and 4 deletions
@@ -176,8 +176,10 @@ public class LogViewModel: BaseViewModel {
public let commandClient: CommandClient
public private(set) var dataModel: LogDataModel!
public init(commandClient: CommandClient) {
public init(commandClient: CommandClient, searchText: String = "") {
self.commandClient = commandClient
self.searchText = searchText
self.isSearching = !searchText.isEmpty
super.init()
dataModel = LogDataModel(commandClient: commandClient, viewModel: self)
}