mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Run SwiftFormat.
This commit is contained in:
@@ -38,7 +38,7 @@ final class LogViewerScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
|
||||
|
||||
func toPresentable() -> AnyView {
|
||||
AnyView(LogViewerScreen(context: viewModel.context))
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class LogViewerScreenViewModel: LogViewerScreenViewModelType, LogViewerScreenVie
|
||||
var actions: AnyPublisher<LogViewerScreenViewModelAction, Never> {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
|
||||
init() {
|
||||
super.init(initialViewState: LogViewerScreenViewState(urls: Tracing.logFiles))
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ struct LogViewerScreen: View {
|
||||
|
||||
private struct PreviewView: UIViewControllerRepresentable {
|
||||
let urls: [URL]
|
||||
|
||||
|
||||
func makeUIViewController(context: Context) -> UIViewController {
|
||||
let previewController = QLPreviewController()
|
||||
previewController.dataSource = context.coordinator
|
||||
@@ -28,16 +28,16 @@ private struct PreviewView: UIViewControllerRepresentable {
|
||||
|
||||
return UINavigationController(rootViewController: previewController)
|
||||
}
|
||||
|
||||
|
||||
func updateUIViewController(_ uiViewController: UIViewController, context: Context) { }
|
||||
|
||||
|
||||
func makeCoordinator() -> Coordinator {
|
||||
Coordinator(view: self)
|
||||
}
|
||||
|
||||
class Coordinator: NSObject, QLPreviewControllerDataSource, QLPreviewControllerDelegate {
|
||||
let view: PreviewView
|
||||
|
||||
|
||||
init(view: PreviewView) {
|
||||
self.view = view
|
||||
}
|
||||
@@ -47,7 +47,7 @@ private struct PreviewView: UIViewControllerRepresentable {
|
||||
func numberOfPreviewItems(in controller: QLPreviewController) -> Int {
|
||||
view.urls.count
|
||||
}
|
||||
|
||||
|
||||
func previewController(_ controller: QLPreviewController, previewItemAt index: Int) -> QLPreviewItem {
|
||||
let url = view.urls[index]
|
||||
|
||||
@@ -65,7 +65,7 @@ private struct PreviewView: UIViewControllerRepresentable {
|
||||
private class PreviewItem: NSObject, QLPreviewItem {
|
||||
var previewItemURL: URL?
|
||||
var previewItemTitle: String?
|
||||
|
||||
|
||||
init(previewItemURL: URL?, previewItemTitle: String?) {
|
||||
self.previewItemURL = previewItemURL
|
||||
self.previewItemTitle = previewItemTitle
|
||||
|
||||
Reference in New Issue
Block a user