mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Update files following swiftformat upgrade
This commit is contained in:
committed by
Stefan Ceriu
parent
fe189fcfed
commit
23062901c0
+23
-7
@@ -24,7 +24,10 @@ class TimelineMediaPreviewController: QLPreviewController {
|
||||
|
||||
private var cancellables: Set<AnyCancellable> = []
|
||||
|
||||
private var navigationBar: UINavigationBar? { view.subviews.first?.subviews.first { $0 is UINavigationBar } as? UINavigationBar }
|
||||
private var navigationBar: UINavigationBar? {
|
||||
view.subviews.first?.subviews.first { $0 is UINavigationBar } as? UINavigationBar
|
||||
}
|
||||
|
||||
private var bottomBarItemsContainer: UIView? {
|
||||
if #available(iOS 26, *) {
|
||||
view.subviews.first?.subviews.last?.subviews.first
|
||||
@@ -33,8 +36,13 @@ class TimelineMediaPreviewController: QLPreviewController {
|
||||
}
|
||||
}
|
||||
|
||||
private var pageScrollView: UIScrollView? { view.firstScrollView() }
|
||||
private var captionView: UIView { captionHostingController.view }
|
||||
private var pageScrollView: UIScrollView? {
|
||||
view.firstScrollView()
|
||||
}
|
||||
|
||||
private var captionView: UIView {
|
||||
captionHostingController.view
|
||||
}
|
||||
|
||||
override var overrideUserInterfaceStyle: UIUserInterfaceStyle {
|
||||
get { .dark }
|
||||
@@ -255,7 +263,9 @@ class TimelineMediaPreviewController: QLPreviewController {
|
||||
|
||||
private struct HeaderView: View {
|
||||
@ObservedObject var context: TimelineMediaPreviewViewModel.Context
|
||||
private var currentItem: TimelineMediaPreviewItem { context.viewState.currentItem }
|
||||
private var currentItem: TimelineMediaPreviewItem {
|
||||
context.viewState.currentItem
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
switch currentItem {
|
||||
@@ -281,7 +291,9 @@ private struct HeaderView: View {
|
||||
|
||||
private struct DetailsButton: View {
|
||||
@ObservedObject var context: TimelineMediaPreviewViewModel.Context
|
||||
private var currentItem: TimelineMediaPreviewItem { context.viewState.currentItem }
|
||||
private var currentItem: TimelineMediaPreviewItem {
|
||||
context.viewState.currentItem
|
||||
}
|
||||
|
||||
var isHidden: Bool {
|
||||
switch currentItem {
|
||||
@@ -301,7 +313,9 @@ private struct DetailsButton: View {
|
||||
|
||||
private struct CaptionView: View {
|
||||
@ObservedObject var context: TimelineMediaPreviewViewModel.Context
|
||||
private var currentItem: TimelineMediaPreviewItem { context.viewState.currentItem }
|
||||
private var currentItem: TimelineMediaPreviewItem {
|
||||
context.viewState.currentItem
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
if case let .media(mediaItem) = currentItem, let caption = mediaItem.caption {
|
||||
@@ -323,7 +337,9 @@ private struct CaptionView: View {
|
||||
|
||||
private struct DownloadIndicatorView: View {
|
||||
@ObservedObject var context: TimelineMediaPreviewViewModel.Context
|
||||
private var currentItem: TimelineMediaPreviewItem { context.viewState.currentItem }
|
||||
private var currentItem: TimelineMediaPreviewItem {
|
||||
context.viewState.currentItem
|
||||
}
|
||||
|
||||
private var shouldShowDownloadIndicator: Bool {
|
||||
switch currentItem {
|
||||
|
||||
+3
-1
@@ -11,7 +11,9 @@ import SwiftUI
|
||||
struct TimelineMediaPreviewFileExportPicker: UIViewControllerRepresentable {
|
||||
struct File: Identifiable {
|
||||
let url: URL
|
||||
var id: String { url.absoluteString }
|
||||
var id: String {
|
||||
url.absoluteString
|
||||
}
|
||||
}
|
||||
|
||||
let file: File
|
||||
|
||||
-1
@@ -57,7 +57,6 @@ struct TimelineMediaPreviewRedactConfirmationView: View {
|
||||
.padding(.horizontal, 24)
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var preview: some View {
|
||||
HStack(spacing: 12) {
|
||||
if let mediaSource = item.thumbnailMediaSource {
|
||||
|
||||
Reference in New Issue
Block a user