Add preview support

This commit is contained in:
世界
2023-07-20 13:15:13 +08:00
parent fdbf50d875
commit 251f441a25
14 changed files with 135 additions and 59 deletions
+8 -4
View File
@@ -61,11 +61,15 @@ public struct LogView: View {
}
private func connectLog() {
guard let profile = extensionProfile.wrappedValue else {
return
}
if profile.status.isConnected, !logClient.isConnected {
if ApplicationLibrary.inPreview {
logClient.reconnect()
} else {
guard let profile = extensionProfile.wrappedValue else {
return
}
if profile.status.isConnected, !logClient.isConnected {
logClient.reconnect()
}
}
}
}