diff options
| author | Fuwn <[email protected]> | 2025-02-19 00:24:03 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-02-19 00:24:03 -0800 |
| commit | aa8501d8f3025d2bf4cbbe08ea5226b0d6f52a38 (patch) | |
| tree | 9d2008bb2a9b4f8d140fc359ad170ad7f0bf087a | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-aa8501d8f3025d2bf4cbbe08ea5226b0d6f52a38.tar.xz sora-testing-aa8501d8f3025d2bf4cbbe08ea5226b0d6f52a38.zip | |
feat: Development commit
| -rw-r--r-- | Sora/Data/Settings.swift | 7 | ||||
| -rw-r--r-- | Sora/Views/Post/PostGridView.swift | 5 | ||||
| -rw-r--r-- | Sora/Views/Settings/SettingsThumbnailsView.swift | 19 |
3 files changed, 1 insertions, 30 deletions
diff --git a/Sora/Data/Settings.swift b/Sora/Data/Settings.swift index 8ce6c1a..808f52d 100644 --- a/Sora/Data/Settings.swift +++ b/Sora/Data/Settings.swift @@ -1,7 +1,6 @@ import SwiftUI class Settings: ObservableObject { - @AppStorage("softLimit") var softLimit: Int = 100 #if DEBUG @AppStorage("detailViewType") var detailViewType: PostFileType = .compressed #else @@ -10,10 +9,4 @@ class Settings: ObservableObject { @AppStorage("thumbnailType") var thumbnailType: PostFileType = .preview @AppStorage("searchSuggestions") var searchSuggestions: Bool = false @AppStorage("columns") var columns: Int = 2 - let minSoftLimit: Int = 100 - let maxSoftLimit: Int = 10000 - - func softLimitAsCGFloat() -> CGFloat { - max(CGFloat(softLimit), CGFloat(minSoftLimit)) - } } diff --git a/Sora/Views/Post/PostGridView.swift b/Sora/Views/Post/PostGridView.swift index 4c43eeb..1cb51fc 100644 --- a/Sora/Views/Post/PostGridView.swift +++ b/Sora/Views/Post/PostGridView.swift @@ -10,10 +10,7 @@ struct PostGridView: View { ScrollView { if manager.posts.isEmpty { ProgressView() - .frame( - width: settings.softLimitAsCGFloat(), - height: settings.softLimitAsCGFloat() - ) + .padding() } WaterfallGrid(manager.posts, id: \.id) { post in diff --git a/Sora/Views/Settings/SettingsThumbnailsView.swift b/Sora/Views/Settings/SettingsThumbnailsView.swift index 8ac9850..0cfb312 100644 --- a/Sora/Views/Settings/SettingsThumbnailsView.swift +++ b/Sora/Views/Settings/SettingsThumbnailsView.swift @@ -9,25 +9,6 @@ struct SettingsThumbnailsView: View { .font(.headline) HStack { - Text("Thumbnail Size") - - Spacer() - - TextField("", value: $settings.softLimit, format: .number) - .textFieldStyle(.roundedBorder) - .frame(width: 100) - } - #else - Stepper( - "Thumbnail Size (\(settings.softLimit))", - value: $settings.softLimit, - in: settings.minSoftLimit ... settings.maxSoftLimit, - step: 10 - ) - #endif - - #if os(macOS) - HStack { Text("Thumbnail Type") Spacer() |