From a510d0d0c252f331c0102226565ca20d19830113 Mon Sep 17 00:00:00 2001 From: Marcin Czachurski Date: Sun, 22 Oct 2023 12:33:43 +0200 Subject: [PATCH] Remove custom indicators --- Localization/Localizable.xcstrings | 92 ------------------- .../xcshareddata/swiftpm/Package.resolved | 9 -- Vernissage/VernissageApp.swift | 2 + Vernissage/Views/EditProfileView.swift | 4 +- Vernissage/Views/ThirdPartyView.swift | 10 -- WidgetsKit/Package.swift | 2 - .../WidgetsKit/Views/ImageUploadView.swift | 2 +- .../WidgetsKit/Views/PlaceSelectorView.swift | 2 +- .../WidgetsKit/Widgets/ActionButton.swift | 2 +- .../WidgetsKit/Widgets/ActionMenu.swift | 2 +- .../WidgetsKit/Widgets/LoadingIndicator.swift | 16 ++-- 11 files changed, 17 insertions(+), 126 deletions(-) diff --git a/Localization/Localizable.xcstrings b/Localization/Localizable.xcstrings index 9365052..13dd086 100644 --- a/Localization/Localizable.xcstrings +++ b/Localization/Localizable.xcstrings @@ -8785,98 +8785,6 @@ } } }, - "thirdparty.loaders.address" : { - "localizations" : { - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "https://github.com/exyte/ActivityIndicatorView" - } - }, - "es" : { - "stringUnit" : { - "state" : "translated", - "value" : "https://github.com/exyte/ActivityIndicatorView" - } - }, - "eu" : { - "stringUnit" : { - "state" : "translated", - "value" : "https://github.com/exyte/ActivityIndicatorView" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "https://github.com/exyte/ActivityIndicatorView" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "https://github.com/exyte/ActivityIndicatorView" - } - } - } - }, - "thirdparty.loaders.description" : { - "comment" : "A number of preset loading indicators created with SwiftUI.", - "localizations" : { - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "A number of preset loading indicators created with SwiftUI." - } - }, - "es" : { - "stringUnit" : { - "state" : "needs_review", - "value" : "Una serie de indicadores de carga preestablecidos creados con SwiftUI." - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Szereg gotowych animacji ładowania utworzonych za pomocą SwiftUI." - } - } - } - }, - "thirdparty.loaders.title" : { - "comment" : "Loaders section title", - "localizations" : { - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "ActivityIndicatorView" - } - }, - "es" : { - "stringUnit" : { - "state" : "translated", - "value" : "ActivityIndicatorView" - } - }, - "eu" : { - "stringUnit" : { - "state" : "translated", - "value" : "ActivityIndicatorView" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "ActivityIndicatorView" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "ActivityIndicatorView" - } - } - } - }, "thirdParty.navigationBar.title" : { "comment" : "Third party view.", "localizations" : { diff --git a/Vernissage.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Vernissage.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 165566c..6376e84 100644 --- a/Vernissage.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Vernissage.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,14 +1,5 @@ { "pins" : [ - { - "identity" : "activityindicatorview", - "kind" : "remoteSourceControl", - "location" : "https://github.com/exyte/ActivityIndicatorView.git", - "state" : { - "revision" : "9970fd0bb7a05dad0b6566ae1f56937716686b24", - "version" : "1.1.1" - } - }, { "identity" : "brightfutures", "kind" : "remoteSourceControl", diff --git a/Vernissage/VernissageApp.swift b/Vernissage/VernissageApp.swift index 7208cca..2938621 100644 --- a/Vernissage/VernissageApp.swift +++ b/Vernissage/VernissageApp.swift @@ -82,6 +82,7 @@ struct VernissageApp: App { self.theme = newValue.colorScheme() } .onChange(of: applicationState.tintColor) { oldValue, newValue in + UIRefreshControl.appearance().tintColor = self.applicationState.tintColor.uiColor() self.tintColor = newValue.color() } .onChange(of: applicationState.account) { oldValue, newValue in @@ -108,6 +109,7 @@ struct VernissageApp: App { private func onApplicationStart() async { UIPageControl.appearance().currentPageIndicatorTintColor = UIColor.white.withAlphaComponent(0.7) UIPageControl.appearance().pageIndicatorTintColor = UIColor.white.withAlphaComponent(0.4) + UIRefreshControl.appearance().tintColor = self.applicationState.tintColor.uiColor() // Configure TipKit. try? Tips.configure([.displayFrequency(.daily), .datastoreLocation(.applicationDefault)]) diff --git a/Vernissage/Views/EditProfileView.swift b/Vernissage/Views/EditProfileView.swift index 96da2f2..e5e8c77 100644 --- a/Vernissage/Views/EditProfileView.swift +++ b/Vernissage/Views/EditProfileView.swift @@ -123,7 +123,9 @@ struct EditProfileView: View { UserAvatar(accountAvatar: account.avatar, size: .large) } - LoadingIndicator(isVisible: $saveDisabled) + if saveDisabled { + LoadingIndicator() + } BottomRight { Button { diff --git a/Vernissage/Views/ThirdPartyView.swift b/Vernissage/Views/ThirdPartyView.swift index 64272be..7246ba8 100644 --- a/Vernissage/Views/ThirdPartyView.swift +++ b/Vernissage/Views/ThirdPartyView.swift @@ -61,16 +61,6 @@ struct ThirdPartyView: View { .font(.footnote) } - Section("thirdparty.loaders.title") { - VStack(alignment: .leading) { - Link("thirdparty.loaders.address", - destination: URL(string: "https://github.com/exyte/ActivityIndicatorView")!) - .padding(.bottom, 4) - Text("thirdparty.loaders.description", comment: "A number of preset loading indicators created with SwiftUI.") - } - .font(.footnote) - } - Section("thirdparty.htmlstring.title") { VStack(alignment: .leading) { Link("thirdparty.htmlstring.address", diff --git a/WidgetsKit/Package.swift b/WidgetsKit/Package.swift index c7ba416..368bd34 100644 --- a/WidgetsKit/Package.swift +++ b/WidgetsKit/Package.swift @@ -17,7 +17,6 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/exyte/ActivityIndicatorView.git", .upToNextMajor(from: "1.0.0")), .package(url: "https://github.com/divadretlaw/EmojiText", .upToNextMajor(from: "2.6.0")), .package(url: "https://github.com/kean/Nuke", .upToNextMajor(from: "12.0.0")), .package(name: "PixelfedKit", path: "../PixelfedKit"), @@ -31,7 +30,6 @@ let package = Package( .target( name: "WidgetsKit", dependencies: [ - .product(name: "ActivityIndicatorView", package: "ActivityIndicatorView"), .product(name: "Nuke", package: "Nuke"), .product(name: "NukeUI", package: "Nuke"), .product(name: "EmojiText", package: "EmojiText"), diff --git a/WidgetsKit/Sources/WidgetsKit/Views/ImageUploadView.swift b/WidgetsKit/Sources/WidgetsKit/Views/ImageUploadView.swift index 46ececa..3504517 100644 --- a/WidgetsKit/Sources/WidgetsKit/Views/ImageUploadView.swift +++ b/WidgetsKit/Sources/WidgetsKit/Views/ImageUploadView.swift @@ -51,7 +51,7 @@ public struct ImageUploadView: View { } else if photoAttachment.uploadedAttachment == nil { ZStack { self.imageView(showAccessories: false, blur: true) - LoadingIndicator(isVisible: Binding.constant(true)) + LoadingIndicator() } } else { self.imageView(showAccessories: true, blur: false) diff --git a/WidgetsKit/Sources/WidgetsKit/Views/PlaceSelectorView.swift b/WidgetsKit/Sources/WidgetsKit/Views/PlaceSelectorView.swift index e514039..1335e34 100644 --- a/WidgetsKit/Sources/WidgetsKit/Views/PlaceSelectorView.swift +++ b/WidgetsKit/Sources/WidgetsKit/Views/PlaceSelectorView.swift @@ -62,7 +62,7 @@ public struct PlaceSelectorView: View { if self.showLoader { HStack(alignment: .center) { Spacer() - LoadingIndicator(isVisible: Binding.constant(true)) + LoadingIndicator() Spacer() } } diff --git a/WidgetsKit/Sources/WidgetsKit/Widgets/ActionButton.swift b/WidgetsKit/Sources/WidgetsKit/Widgets/ActionButton.swift index 79ed64f..469e302 100644 --- a/WidgetsKit/Sources/WidgetsKit/Widgets/ActionButton.swift +++ b/WidgetsKit/Sources/WidgetsKit/Widgets/ActionButton.swift @@ -46,7 +46,7 @@ public struct ActionButton