diff --git a/Shared/Player/ChapterView.swift b/Shared/Player/ChapterView.swift index f8225bf2..b6baca04 100644 --- a/Shared/Player/ChapterView.swift +++ b/Shared/Player/ChapterView.swift @@ -1,4 +1,3 @@ -import CachedAsyncImage import Foundation import SDWebImageSwiftUI import SwiftUI @@ -33,7 +32,7 @@ struct ChapterView: View { @ViewBuilder func smallImage(_ chapter: Chapter) -> some View { if #available(iOS 15, macOS 12, *) { - CachedAsyncImage(url: chapter.image) { image in + AsyncImage(url: chapter.image) { image in image .resizable() } placeholder: { diff --git a/Shared/Player/Controls/PlayerControls.swift b/Shared/Player/Controls/PlayerControls.swift index cc682c75..c2dba509 100644 --- a/Shared/Player/Controls/PlayerControls.swift +++ b/Shared/Player/Controls/PlayerControls.swift @@ -1,4 +1,3 @@ -import CachedAsyncImage import Defaults import Foundation import SDWebImageSwiftUI @@ -223,7 +222,7 @@ struct PlayerControls: View { let url = thumbnails.best(video) { if #available(iOS 15, macOS 12, *) { - CachedAsyncImage(url: url) { image in + AsyncImage(url: url) { image in image .resizable() } placeholder: { diff --git a/Shared/Videos/VideoBanner.swift b/Shared/Videos/VideoBanner.swift index 8c175fec..5d938f92 100644 --- a/Shared/Videos/VideoBanner.swift +++ b/Shared/Videos/VideoBanner.swift @@ -1,4 +1,3 @@ -import CachedAsyncImage import CoreMedia import Foundation import SDWebImageSwiftUI @@ -74,7 +73,7 @@ struct VideoBanner: View { @ViewBuilder private var smallThumbnail: some View { let url = video?.thumbnailURL(quality: .medium) if #available(iOS 15, macOS 12, *) { - CachedAsyncImage(url: url) { image in + AsyncImage(url: url) { image in image .resizable() } placeholder: { diff --git a/Shared/Videos/VideoCell.swift b/Shared/Videos/VideoCell.swift index 501b5b17..8236f4ea 100644 --- a/Shared/Videos/VideoCell.swift +++ b/Shared/Videos/VideoCell.swift @@ -1,4 +1,3 @@ -import CachedAsyncImage import CoreMedia import Defaults import SDWebImageSwiftUI @@ -423,7 +422,7 @@ struct VideoCell: View { Group { let url = thumbnails.best(video) if #available(iOS 15, macOS 12, *) { - CachedAsyncImage(url: url) { image in + AsyncImage(url: url) { image in image .resizable() } placeholder: { diff --git a/Shared/Views/ChannelCell.swift b/Shared/Views/ChannelCell.swift index cf526632..7243ccfb 100644 --- a/Shared/Views/ChannelCell.swift +++ b/Shared/Views/ChannelCell.swift @@ -1,4 +1,3 @@ -import CachedAsyncImage import Foundation import SDWebImageSwiftUI import SwiftUI @@ -39,7 +38,7 @@ struct ChannelCell: View { } .foregroundColor(.secondary) if #available(iOS 15, macOS 12, *) { - CachedAsyncImage(url: channel.thumbnailURL) { image in + AsyncImage(url: channel.thumbnailURL) { image in image .resizable() } placeholder: { diff --git a/Shared/Views/ChannelPlaylistCell.swift b/Shared/Views/ChannelPlaylistCell.swift index 9e7bc0a5..a442f6a7 100644 --- a/Shared/Views/ChannelPlaylistCell.swift +++ b/Shared/Views/ChannelPlaylistCell.swift @@ -1,4 +1,3 @@ -import CachedAsyncImage import SDWebImageSwiftUI import SwiftUI @@ -39,7 +38,7 @@ struct ChannelPlaylistCell: View { .foregroundColor(.secondary) if #available(iOS 15, macOS 12, *) { - CachedAsyncImage(url: playlist.thumbnailURL) { image in + AsyncImage(url: playlist.thumbnailURL) { image in image .resizable() } placeholder: { diff --git a/Shared/Views/ControlsBar.swift b/Shared/Views/ControlsBar.swift index 4955a56f..5ee37a44 100644 --- a/Shared/Views/ControlsBar.swift +++ b/Shared/Views/ControlsBar.swift @@ -1,4 +1,3 @@ -import CachedAsyncImage import Defaults import SDWebImageSwiftUI import SwiftUI @@ -273,7 +272,7 @@ struct ControlsBar: View { Group { if let video = model.currentItem?.video, let url = video.channel.thumbnailURL { if #available(iOS 15, macOS 12, *) { - CachedAsyncImage(url: url) { image in + AsyncImage(url: url) { image in image .resizable() } placeholder: { diff --git a/Yattee.xcodeproj/project.pbxproj b/Yattee.xcodeproj/project.pbxproj index b0ca9c64..61cabfc9 100644 --- a/Yattee.xcodeproj/project.pbxproj +++ b/Yattee.xcodeproj/project.pbxproj @@ -246,9 +246,6 @@ 3736A219286BB72300C9E5EE /* libharfbuzz.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3736A1FC286BB72300C9E5EE /* libharfbuzz.xcframework */; }; 3736A21A286BB72300C9E5EE /* libmpv.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3736A1FD286BB72300C9E5EE /* libmpv.xcframework */; }; 3736A21B286BB72300C9E5EE /* libmpv.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3736A1FD286BB72300C9E5EE /* libmpv.xcframework */; }; - 373AD20128BF504B00DB3ADA /* CachedAsyncImage in Frameworks */ = {isa = PBXBuildFile; productRef = 373AD20028BF504B00DB3ADA /* CachedAsyncImage */; }; - 373AD20328BF512400DB3ADA /* CachedAsyncImage in Frameworks */ = {isa = PBXBuildFile; productRef = 373AD20228BF512400DB3ADA /* CachedAsyncImage */; }; - 373AD20528BF579F00DB3ADA /* CachedAsyncImage in Frameworks */ = {isa = PBXBuildFile; productRef = 373AD20428BF579F00DB3ADA /* CachedAsyncImage */; }; 373C8FE4275B955100CB5936 /* CommentsPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 373C8FE3275B955100CB5936 /* CommentsPage.swift */; }; 373C8FE5275B955100CB5936 /* CommentsPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 373C8FE3275B955100CB5936 /* CommentsPage.swift */; }; 373C8FE6275B955100CB5936 /* CommentsPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 373C8FE3275B955100CB5936 /* CommentsPage.swift */; }; @@ -1370,7 +1367,6 @@ 375B8AB128B57F4200397B31 /* KeychainAccess in Frameworks */, 3736A21A286BB72300C9E5EE /* libmpv.xcframework in Frameworks */, 3765917C27237D21009F956E /* PINCache in Frameworks */, - 373AD20328BF512400DB3ADA /* CachedAsyncImage in Frameworks */, 37BD07B72698AB2E003EBB87 /* Defaults in Frameworks */, 3736A20C286BB72300C9E5EE /* libavutil.xcframework in Frameworks */, 37FB285627220D9000A57617 /* SDWebImagePINPlugin in Frameworks */, @@ -1434,7 +1430,6 @@ 3703205C27D2BAF3007A0CB8 /* SwiftyJSON in Frameworks */, 370F4FD627CC16CB001B35DC /* libbrotlidec.1.0.9.dylib in Frameworks */, 370F4FCD27CC16CB001B35DC /* libfribidi.0.dylib in Frameworks */, - 373AD20528BF579F00DB3ADA /* CachedAsyncImage in Frameworks */, 370F4FE027CC16CB001B35DC /* libX11.6.dylib in Frameworks */, 370F4FD727CC16CB001B35DC /* libharfbuzz-subset.0.dylib in Frameworks */, ); @@ -1484,7 +1479,6 @@ 3736A209286BB72300C9E5EE /* libcrypto.xcframework in Frameworks */, 37FB28462722054C00A57617 /* SDWebImageSwiftUI in Frameworks */, 3736A217286BB72300C9E5EE /* libavfilter.xcframework in Frameworks */, - 373AD20128BF504B00DB3ADA /* CachedAsyncImage in Frameworks */, 3736A21B286BB72300C9E5EE /* libmpv.xcframework in Frameworks */, 3765917E27237D2A009F956E /* PINCache in Frameworks */, 3772003E27E8EEEB00CB2475 /* VideoToolbox.framework in Frameworks */, @@ -2359,7 +2353,6 @@ 37EE6DC428A305AD00BFD632 /* Reachability */, 3799AC0828B03CED001376F9 /* ActiveLabel */, 375B8AB028B57F4200397B31 /* KeychainAccess */, - 373AD20228BF512400DB3ADA /* CachedAsyncImage */, ); productName = "Yattee (iOS)"; productReference = 37D4B0C92671614900C925CA /* Yattee.app */; @@ -2397,7 +2390,6 @@ 37A5DBC5285E06B100CA4DD1 /* SwiftUIPager */, 372AA413286D06A10000B1DC /* Repeat */, 375B8AB628B583BD00397B31 /* KeychainAccess */, - 373AD20428BF579F00DB3ADA /* CachedAsyncImage */, ); productName = "Yattee (macOS)"; productReference = 37D4B0CF2671614900C925CA /* Yattee.app */; @@ -2475,7 +2467,6 @@ 372AA411286D06950000B1DC /* Repeat */, 37E80F42287B7AAF00561799 /* SwiftUIPager */, 3732BFCF28B83763009F3F4D /* KeychainAccess */, - 373AD20028BF504B00DB3ADA /* CachedAsyncImage */, ); productName = Yattee; productReference = 37D4B158267164AE00C925CA /* Yattee.app */; @@ -2576,7 +2567,6 @@ 37EE6DC328A305AD00BFD632 /* XCRemoteSwiftPackageReference "Reachability" */, 3799AC0728B03CEC001376F9 /* XCRemoteSwiftPackageReference "ActiveLabel.swift" */, 375B8AAF28B57F4200397B31 /* XCRemoteSwiftPackageReference "KeychainAccess" */, - 373AD1FF28BF504B00DB3ADA /* XCRemoteSwiftPackageReference "swiftui-cached-async-image" */, ); productRefGroup = 37D4B0CA2671614900C925CA /* Products */; projectDirPath = ""; @@ -4428,14 +4418,6 @@ minimumVersion = 0.6.0; }; }; - 373AD1FF28BF504B00DB3ADA /* XCRemoteSwiftPackageReference "swiftui-cached-async-image" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/lorenzofiamingo/swiftui-cached-async-image"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 2.0.0; - }; - }; 375B8AAF28B57F4200397B31 /* XCRemoteSwiftPackageReference "KeychainAccess" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/kishikawakatsumi/KeychainAccess.git"; @@ -4621,21 +4603,6 @@ package = 375B8AAF28B57F4200397B31 /* XCRemoteSwiftPackageReference "KeychainAccess" */; productName = KeychainAccess; }; - 373AD20028BF504B00DB3ADA /* CachedAsyncImage */ = { - isa = XCSwiftPackageProductDependency; - package = 373AD1FF28BF504B00DB3ADA /* XCRemoteSwiftPackageReference "swiftui-cached-async-image" */; - productName = CachedAsyncImage; - }; - 373AD20228BF512400DB3ADA /* CachedAsyncImage */ = { - isa = XCSwiftPackageProductDependency; - package = 373AD1FF28BF504B00DB3ADA /* XCRemoteSwiftPackageReference "swiftui-cached-async-image" */; - productName = CachedAsyncImage; - }; - 373AD20428BF579F00DB3ADA /* CachedAsyncImage */ = { - isa = XCSwiftPackageProductDependency; - package = 373AD1FF28BF504B00DB3ADA /* XCRemoteSwiftPackageReference "swiftui-cached-async-image" */; - productName = CachedAsyncImage; - }; 375B8AB028B57F4200397B31 /* KeychainAccess */ = { isa = XCSwiftPackageProductDependency; package = 375B8AAF28B57F4200397B31 /* XCRemoteSwiftPackageReference "KeychainAccess" */; diff --git a/Yattee.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Yattee.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 2fa86942..2e728edf 100644 --- a/Yattee.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Yattee.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -135,15 +135,6 @@ "version" : "1.4.4" } }, - { - "identity" : "swiftui-cached-async-image", - "kind" : "remoteSourceControl", - "location" : "https://github.com/lorenzofiamingo/swiftui-cached-async-image", - "state" : { - "revision" : "467a3d17479887943ab917a379e62bbaff60ac8a", - "version" : "2.1.1" - } - }, { "identity" : "swiftui-introspect", "kind" : "remoteSourceControl",