mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-05-17 03:52:42 +00:00
Swiftformat .
This commit is contained in:
parent
fd3d9fc2bc
commit
058500f91e
|
@ -49,8 +49,8 @@ public struct ConversationsListView: View {
|
|||
}
|
||||
} else if conversations.isEmpty, !viewModel.isLoadingFirstPage, !viewModel.isError {
|
||||
PlaceholderView(iconName: "tray",
|
||||
title: "conversations.empty.title",
|
||||
message: "conversations.empty.message")
|
||||
title: "conversations.empty.title",
|
||||
message: "conversations.empty.message")
|
||||
} else if viewModel.isError {
|
||||
ErrorView(title: "conversations.error.title",
|
||||
message: "conversations.error.message",
|
||||
|
|
|
@ -52,7 +52,7 @@ import UIKit
|
|||
try? await Task.sleep(for: .seconds(0.1))
|
||||
for delegate in observedSceneDelegate {
|
||||
#if os(visionOS)
|
||||
let newWidth = delegate.window?.bounds.size.width ?? 0
|
||||
let newWidth = delegate.window?.bounds.size.width ?? 0
|
||||
if delegate.windowWidth != newWidth {
|
||||
delegate.windowWidth = newWidth
|
||||
}
|
||||
|
|
|
@ -46,7 +46,5 @@ public struct ErrorView: View {
|
|||
#Preview {
|
||||
ErrorView(title: "Error",
|
||||
message: "Error loading. Please try again",
|
||||
buttonTitle: "Retry") {
|
||||
|
||||
}
|
||||
buttonTitle: "Retry") {}
|
||||
}
|
||||
|
|
|
@ -52,13 +52,10 @@ public struct NextPageView: View {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#Preview {
|
||||
List {
|
||||
Text("Item 1")
|
||||
NextPageView {
|
||||
|
||||
}
|
||||
NextPageView {}
|
||||
}
|
||||
.listStyle(.plain)
|
||||
}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import SwiftUI
|
||||
import Network
|
||||
import SwiftUI
|
||||
|
||||
@MainActor
|
||||
public extension View {
|
||||
func withPreviewsEnv() -> some View{
|
||||
func withPreviewsEnv() -> some View {
|
||||
environment(RouterPath())
|
||||
.environment(Client(server: ""))
|
||||
.environment(CurrentAccount.shared)
|
||||
.environment(UserPreferences.shared)
|
||||
.environment(CurrentInstance.shared)
|
||||
.environment(PushNotificationsService.shared)
|
||||
.environment(QuickLook.shared)
|
||||
.environment(Client(server: ""))
|
||||
.environment(CurrentAccount.shared)
|
||||
.environment(UserPreferences.shared)
|
||||
.environment(CurrentInstance.shared)
|
||||
.environment(PushNotificationsService.shared)
|
||||
.environment(QuickLook.shared)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,8 +33,8 @@ public struct ExploreView: View {
|
|||
if let results = viewModel.results[viewModel.searchQuery] {
|
||||
if results.isEmpty, !viewModel.isSearching {
|
||||
PlaceholderView(iconName: "magnifyingglass",
|
||||
title: "explore.search.empty.title",
|
||||
message: "explore.search.empty.message")
|
||||
title: "explore.search.empty.title",
|
||||
message: "explore.search.empty.message")
|
||||
.listRowBackground(theme.secondaryBackgroundColor)
|
||||
.listRowSeparator(.hidden)
|
||||
} else {
|
||||
|
@ -54,8 +54,8 @@ public struct ExploreView: View {
|
|||
}
|
||||
} else if viewModel.allSectionsEmpty {
|
||||
PlaceholderView(iconName: "magnifyingglass",
|
||||
title: "explore.search.title",
|
||||
message: "explore.search.message-\(client.server)")
|
||||
title: "explore.search.title",
|
||||
message: "explore.search.message-\(client.server)")
|
||||
#if !os(visionOS)
|
||||
.listRowBackground(theme.secondaryBackgroundColor)
|
||||
#endif
|
||||
|
|
|
@ -154,8 +154,8 @@ public struct NotificationsListView: View {
|
|||
case let .display(notifications, nextPageState):
|
||||
if notifications.isEmpty {
|
||||
PlaceholderView(iconName: "bell.slash",
|
||||
title: "notifications.empty.title",
|
||||
message: "notifications.empty.message")
|
||||
title: "notifications.empty.title",
|
||||
message: "notifications.empty.message")
|
||||
#if !os(visionOS)
|
||||
.listRowBackground(theme.primaryBackgroundColor)
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import DesignSystem
|
||||
import SwiftUI
|
||||
import Env
|
||||
import SwiftUI
|
||||
|
||||
@MainActor
|
||||
public struct TimelineContentFilterView: View {
|
||||
|
|
Loading…
Reference in a new issue