From 709dd79e25d0d205e075267b8d3bc587b17b2db8 Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Fri, 19 Jan 2024 08:51:29 +0100 Subject: [PATCH] Fix for visionOS + Remove shimmer --- .../xcshareddata/swiftpm/Package.resolved | 9 --------- IceCubesApp/App/Tabs/ExploreTab.swift | 1 - IceCubesApp/App/Tabs/MessagesTab.swift | 1 - IceCubesApp/App/Tabs/ProfileTab.swift | 1 - IceCubesApp/App/Tabs/Settings/AddAccountsView.swift | 2 -- IceCubesApp/App/Tabs/Settings/SupportAppView.swift | 2 -- IceCubesApp/App/Tabs/TagGroup/EditTagGroupView.swift | 1 - .../App/Tabs/Timeline/AddRemoteTimelineView.swift | 1 - .../Sources/Account/AccountDetailHeaderView.swift | 5 ----- Packages/Account/Sources/Account/AccountDetailView.swift | 1 - .../Sources/Account/AccountsList/AccountsListView.swift | 2 -- .../Conversations/List/ConversationsListView.swift | 1 - Packages/DesignSystem/Package.swift | 2 -- .../Sources/DesignSystem/Views/AccountPopoverView.swift | 1 - .../Sources/DesignSystem/Views/AvatarView.swift | 1 - Packages/Explore/Sources/Explore/ExploreView.swift | 1 - .../Sources/Notifications/NotificationsListView.swift | 1 - .../Sources/StatusKit/Detail/StatusDetailView.swift | 1 - .../StatusKit/Editor/Components/AccessoryView.swift | 1 - .../StatusKit/Editor/Components/MediaEditView.swift | 2 -- .../Sources/StatusKit/List/StatusesListView.swift | 1 - .../StatusKit/Sources/StatusKit/Row/StatusRowView.swift | 1 - .../StatusKit/Row/Subviews/StatusRowCardView.swift | 4 ++-- .../StatusKit/Row/Subviews/StatusRowContentView.swift | 1 - .../Timeline/Sources/Timeline/View/TimelineView.swift | 1 - 25 files changed, 2 insertions(+), 43 deletions(-) diff --git a/IceCubesApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/IceCubesApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 234d1dfd..21eaa53c 100644 --- a/IceCubesApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/IceCubesApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -116,15 +116,6 @@ "revision" : "9e1cc02a65b22e09a8251261cccbccce02731fc5", "version" : "1.1.1" } - }, - { - "identity" : "swiftui-shimmer", - "kind" : "remoteSourceControl", - "location" : "https://github.com/markiv/SwiftUI-Shimmer", - "state" : { - "revision" : "965a7cbcbf094cbcf22b9251a2323bdc3432e171", - "version" : "1.1.0" - } } ], "version" : 2 diff --git a/IceCubesApp/App/Tabs/ExploreTab.swift b/IceCubesApp/App/Tabs/ExploreTab.swift index 844f36e8..1292bbf5 100644 --- a/IceCubesApp/App/Tabs/ExploreTab.swift +++ b/IceCubesApp/App/Tabs/ExploreTab.swift @@ -4,7 +4,6 @@ import Env import Explore import Models import Network -import Shimmer import SwiftUI @MainActor diff --git a/IceCubesApp/App/Tabs/MessagesTab.swift b/IceCubesApp/App/Tabs/MessagesTab.swift index 8c881f58..d94886ce 100644 --- a/IceCubesApp/App/Tabs/MessagesTab.swift +++ b/IceCubesApp/App/Tabs/MessagesTab.swift @@ -5,7 +5,6 @@ import DesignSystem import Env import Models import Network -import Shimmer import SwiftUI @MainActor diff --git a/IceCubesApp/App/Tabs/ProfileTab.swift b/IceCubesApp/App/Tabs/ProfileTab.swift index 421e8ef6..6c750a8a 100644 --- a/IceCubesApp/App/Tabs/ProfileTab.swift +++ b/IceCubesApp/App/Tabs/ProfileTab.swift @@ -5,7 +5,6 @@ import DesignSystem import Env import Models import Network -import Shimmer import SwiftUI @MainActor diff --git a/IceCubesApp/App/Tabs/Settings/AddAccountsView.swift b/IceCubesApp/App/Tabs/Settings/AddAccountsView.swift index 03e07df6..884eb45e 100644 --- a/IceCubesApp/App/Tabs/Settings/AddAccountsView.swift +++ b/IceCubesApp/App/Tabs/Settings/AddAccountsView.swift @@ -6,7 +6,6 @@ import Models import Network import NukeUI import SafariServices -import Shimmer import SwiftUI @MainActor @@ -265,7 +264,6 @@ struct AddAccountView: View { } .redacted(reason: .placeholder) .allowsHitTesting(false) - .shimmering() #if !os(visionOS) .listRowBackground(theme.primaryBackgroundColor) #endif diff --git a/IceCubesApp/App/Tabs/Settings/SupportAppView.swift b/IceCubesApp/App/Tabs/Settings/SupportAppView.swift index 6114ef18..25d08b4a 100644 --- a/IceCubesApp/App/Tabs/Settings/SupportAppView.swift +++ b/IceCubesApp/App/Tabs/Settings/SupportAppView.swift @@ -1,7 +1,6 @@ import DesignSystem import Env import RevenueCat -import Shimmer import SwiftUI @MainActor @@ -280,6 +279,5 @@ struct SupportAppView: View { } .redacted(reason: .placeholder) .allowsHitTesting(false) - .shimmering() } } diff --git a/IceCubesApp/App/Tabs/TagGroup/EditTagGroupView.swift b/IceCubesApp/App/Tabs/TagGroup/EditTagGroupView.swift index c4154553..2cbf7bb4 100644 --- a/IceCubesApp/App/Tabs/TagGroup/EditTagGroupView.swift +++ b/IceCubesApp/App/Tabs/TagGroup/EditTagGroupView.swift @@ -5,7 +5,6 @@ import Models import Network import NukeUI import SFSafeSymbols -import Shimmer import SwiftData import SwiftUI diff --git a/IceCubesApp/App/Tabs/Timeline/AddRemoteTimelineView.swift b/IceCubesApp/App/Tabs/Timeline/AddRemoteTimelineView.swift index c74e1644..f99a91b4 100644 --- a/IceCubesApp/App/Tabs/Timeline/AddRemoteTimelineView.swift +++ b/IceCubesApp/App/Tabs/Timeline/AddRemoteTimelineView.swift @@ -4,7 +4,6 @@ import Env import Models import Network import NukeUI -import Shimmer import SwiftUI @MainActor diff --git a/Packages/Account/Sources/Account/AccountDetailHeaderView.swift b/Packages/Account/Sources/Account/AccountDetailHeaderView.swift index 756a338f..ed157b88 100644 --- a/Packages/Account/Sources/Account/AccountDetailHeaderView.swift +++ b/Packages/Account/Sources/Account/AccountDetailHeaderView.swift @@ -3,7 +3,6 @@ import EmojiText import Env import Models import NukeUI -import Shimmer import SwiftUI @MainActor @@ -62,10 +61,6 @@ struct AccountDetailHeaderView: View { .overlay(account.haveHeader ? .black.opacity(0.50) : .clear) .frame(height: Constants.headerHeight) .clipped() - } else if state.isLoading { - theme.secondaryBackgroundColor - .frame(height: Constants.headerHeight) - .shimmering() } else { theme.secondaryBackgroundColor .frame(height: Constants.headerHeight) diff --git a/Packages/Account/Sources/Account/AccountDetailView.swift b/Packages/Account/Sources/Account/AccountDetailView.swift index ef4268a5..7deb8251 100644 --- a/Packages/Account/Sources/Account/AccountDetailView.swift +++ b/Packages/Account/Sources/Account/AccountDetailView.swift @@ -3,7 +3,6 @@ import EmojiText import Env import Models import Network -import Shimmer import StatusKit import SwiftUI diff --git a/Packages/Account/Sources/Account/AccountsList/AccountsListView.swift b/Packages/Account/Sources/Account/AccountsList/AccountsListView.swift index 93819ad1..b2dfe5e0 100644 --- a/Packages/Account/Sources/Account/AccountsList/AccountsListView.swift +++ b/Packages/Account/Sources/Account/AccountsList/AccountsListView.swift @@ -2,7 +2,6 @@ import DesignSystem import Env import Models import Network -import Shimmer import SwiftUI @MainActor @@ -90,7 +89,6 @@ public struct AccountsListView: View { AccountsListRow(viewModel: .init(account: .placeholder(), relationShip: .placeholder())) .redacted(reason: .placeholder) .allowsHitTesting(false) - .shimmering() #if !os(visionOS) .listRowBackground(theme.primaryBackgroundColor) #endif diff --git a/Packages/Conversations/Sources/Conversations/List/ConversationsListView.swift b/Packages/Conversations/Sources/Conversations/List/ConversationsListView.swift index 4bfb18d5..d37594f1 100644 --- a/Packages/Conversations/Sources/Conversations/List/ConversationsListView.swift +++ b/Packages/Conversations/Sources/Conversations/List/ConversationsListView.swift @@ -2,7 +2,6 @@ import DesignSystem import Env import Models import Network -import Shimmer import SwiftUI @MainActor diff --git a/Packages/DesignSystem/Package.swift b/Packages/DesignSystem/Package.swift index bf17f11b..9e55c979 100644 --- a/Packages/DesignSystem/Package.swift +++ b/Packages/DesignSystem/Package.swift @@ -19,7 +19,6 @@ let package = Package( dependencies: [ .package(name: "Models", path: "../Models"), .package(name: "Env", path: "../Env"), - .package(url: "https://github.com/markiv/SwiftUI-Shimmer", exact: "1.1.0"), .package(url: "https://github.com/kean/Nuke", from: "12.0.0"), .package(url: "https://github.com/divadretlaw/EmojiText", from: "3.2.1"), ], @@ -29,7 +28,6 @@ let package = Package( dependencies: [ .product(name: "Models", package: "Models"), .product(name: "Env", package: "Env"), - .product(name: "Shimmer", package: "SwiftUI-Shimmer"), .product(name: "NukeUI", package: "Nuke"), .product(name: "Nuke", package: "Nuke"), .product(name: "EmojiText", package: "EmojiText"), diff --git a/Packages/DesignSystem/Sources/DesignSystem/Views/AccountPopoverView.swift b/Packages/DesignSystem/Sources/DesignSystem/Views/AccountPopoverView.swift index 0d5cc7d5..4b9782f6 100644 --- a/Packages/DesignSystem/Sources/DesignSystem/Views/AccountPopoverView.swift +++ b/Packages/DesignSystem/Sources/DesignSystem/Views/AccountPopoverView.swift @@ -2,7 +2,6 @@ import Env import Models import Nuke import NukeUI -import Shimmer import SwiftUI struct AccountPopoverView: View { diff --git a/Packages/DesignSystem/Sources/DesignSystem/Views/AvatarView.swift b/Packages/DesignSystem/Sources/DesignSystem/Views/AvatarView.swift index 89f15b15..0d502807 100644 --- a/Packages/DesignSystem/Sources/DesignSystem/Views/AvatarView.swift +++ b/Packages/DesignSystem/Sources/DesignSystem/Views/AvatarView.swift @@ -1,7 +1,6 @@ import Models import Nuke import NukeUI -import Shimmer import SwiftUI @MainActor diff --git a/Packages/Explore/Sources/Explore/ExploreView.swift b/Packages/Explore/Sources/Explore/ExploreView.swift index 1fdcef2f..193afe69 100644 --- a/Packages/Explore/Sources/Explore/ExploreView.swift +++ b/Packages/Explore/Sources/Explore/ExploreView.swift @@ -3,7 +3,6 @@ import DesignSystem import Env import Models import Network -import Shimmer import StatusKit import SwiftUI diff --git a/Packages/Notifications/Sources/Notifications/NotificationsListView.swift b/Packages/Notifications/Sources/Notifications/NotificationsListView.swift index 40c560a1..b1e98b39 100644 --- a/Packages/Notifications/Sources/Notifications/NotificationsListView.swift +++ b/Packages/Notifications/Sources/Notifications/NotificationsListView.swift @@ -2,7 +2,6 @@ import DesignSystem import Env import Models import Network -import Shimmer import SwiftUI @MainActor diff --git a/Packages/StatusKit/Sources/StatusKit/Detail/StatusDetailView.swift b/Packages/StatusKit/Sources/StatusKit/Detail/StatusDetailView.swift index 76ffe6fd..02d94684 100644 --- a/Packages/StatusKit/Sources/StatusKit/Detail/StatusDetailView.swift +++ b/Packages/StatusKit/Sources/StatusKit/Detail/StatusDetailView.swift @@ -2,7 +2,6 @@ import DesignSystem import Env import Models import Network -import Shimmer import SwiftUI @MainActor diff --git a/Packages/StatusKit/Sources/StatusKit/Editor/Components/AccessoryView.swift b/Packages/StatusKit/Sources/StatusKit/Editor/Components/AccessoryView.swift index be976756..739a0442 100644 --- a/Packages/StatusKit/Sources/StatusKit/Editor/Components/AccessoryView.swift +++ b/Packages/StatusKit/Sources/StatusKit/Editor/Components/AccessoryView.swift @@ -292,7 +292,6 @@ extension StatusEditor { .fill(Color.gray) .frame(width: 40, height: 40) .accessibility(hidden: true) - .shimmering() } } .onTapGesture { diff --git a/Packages/StatusKit/Sources/StatusKit/Editor/Components/MediaEditView.swift b/Packages/StatusKit/Sources/StatusKit/Editor/Components/MediaEditView.swift index 6404de8f..ddd5ef31 100644 --- a/Packages/StatusKit/Sources/StatusKit/Editor/Components/MediaEditView.swift +++ b/Packages/StatusKit/Sources/StatusKit/Editor/Components/MediaEditView.swift @@ -2,7 +2,6 @@ import DesignSystem import Env import Models import Network -import Shimmer import SwiftUI extension StatusEditor { @@ -54,7 +53,6 @@ extension StatusEditor { RoundedRectangle(cornerRadius: 8) .fill(Color.gray) .frame(height: 200) - .shimmering() } ) } diff --git a/Packages/StatusKit/Sources/StatusKit/List/StatusesListView.swift b/Packages/StatusKit/Sources/StatusKit/List/StatusesListView.swift index 1a0acd77..e57ba341 100644 --- a/Packages/StatusKit/Sources/StatusKit/List/StatusesListView.swift +++ b/Packages/StatusKit/Sources/StatusKit/List/StatusesListView.swift @@ -2,7 +2,6 @@ import DesignSystem import Env import Models import Network -import Shimmer import SwiftUI @MainActor diff --git a/Packages/StatusKit/Sources/StatusKit/Row/StatusRowView.swift b/Packages/StatusKit/Sources/StatusKit/Row/StatusRowView.swift index 2e9e1e8b..de536543 100644 --- a/Packages/StatusKit/Sources/StatusKit/Row/StatusRowView.swift +++ b/Packages/StatusKit/Sources/StatusKit/Row/StatusRowView.swift @@ -4,7 +4,6 @@ import Env import Foundation import Models import Network -import Shimmer import SwiftUI @MainActor diff --git a/Packages/StatusKit/Sources/StatusKit/Row/Subviews/StatusRowCardView.swift b/Packages/StatusKit/Sources/StatusKit/Row/Subviews/StatusRowCardView.swift index b69da8c1..c30965b6 100644 --- a/Packages/StatusKit/Sources/StatusKit/Row/Subviews/StatusRowCardView.swift +++ b/Packages/StatusKit/Sources/StatusKit/Row/Subviews/StatusRowCardView.swift @@ -2,7 +2,6 @@ import DesignSystem import Models import Nuke import NukeUI -import Shimmer import SwiftUI @MainActor @@ -60,7 +59,8 @@ public struct StatusRowCardView: View { .frame(maxWidth: maxWidth) .fixedSize(horizontal: false, vertical: true) #if os(visionOS) - .background(Material.thick) + .background(.background) + .hoverEffect() #else .background(theme.secondaryBackgroundColor) #endif diff --git a/Packages/StatusKit/Sources/StatusKit/Row/Subviews/StatusRowContentView.swift b/Packages/StatusKit/Sources/StatusKit/Row/Subviews/StatusRowContentView.swift index 63cedd85..0e96c9b8 100644 --- a/Packages/StatusKit/Sources/StatusKit/Row/Subviews/StatusRowContentView.swift +++ b/Packages/StatusKit/Sources/StatusKit/Row/Subviews/StatusRowContentView.swift @@ -36,7 +36,6 @@ struct StatusRowContentView: View { routerPath: viewModel.routerPath) .fixedSize(horizontal: false, vertical: true) .redacted(reason: viewModel.isEmbedLoading ? .placeholder : []) - .shimmering(active: viewModel.isEmbedLoading) .transition(.opacity) } diff --git a/Packages/Timeline/Sources/Timeline/View/TimelineView.swift b/Packages/Timeline/Sources/Timeline/View/TimelineView.swift index 72fdfe61..03d2c418 100644 --- a/Packages/Timeline/Sources/Timeline/View/TimelineView.swift +++ b/Packages/Timeline/Sources/Timeline/View/TimelineView.swift @@ -3,7 +3,6 @@ import DesignSystem import Env import Models import Network -import Shimmer import StatusKit import SwiftData import SwiftUI