Skip to content

Commit

Permalink
Fix cashe
Browse files Browse the repository at this point in the history
  • Loading branch information
aromanov91 committed Jul 6, 2023
1 parent 27dd1a3 commit 6430ae9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ let package = Package(
.product(name: "OversizeUI", package: "OversizeUI"),
.product(name: "OversizeServices", package: "OversizeServices"),
.product(name: "CachedAsyncImage", package: "swiftui-cached-async-image"),
.product(name: "OversizeCore", package: "OversizeCore"),
/*
.product(name: "OversizeNetwork", package: "OversizeNetwork"),
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
Expand Down
3 changes: 2 additions & 1 deletion Sources/OversizeAdsKit/AdView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
//

import CachedAsyncImage
import OversizeCore
import OversizeKit
import OversizeServices
import OversizeUI
Expand Down Expand Up @@ -37,7 +38,7 @@ public struct AdView: View {

var premiumBanner: some View {
HStack(spacing: .zero) {
CachedAsyncImage(url: URL(string: "\(Info.links?.company.cdnString ?? "")/assets/apps/\(viewModel.appAd?.path ?? "")/icon.png"), content: {
CachedAsyncImage(url: URL(string: "\(Info.links?.company.cdnString ?? "")/assets/apps/\(viewModel.appAd?.path ?? "")/icon.png"), urlCache: .imageCache, content: {
$0
.resizable()
.frame(width: 64, height: 64)
Expand Down
9 changes: 5 additions & 4 deletions Sources/OversizeKit/SettingsKit/Views/About/AboutView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import CachedAsyncImage
import OversizeComponents
import OversizeCore
import OversizeLocalizable
import OversizeResources
import OversizeServices
Expand Down Expand Up @@ -204,7 +205,7 @@ import SwiftUI
} label: {
VStack(spacing: .xSmall) {
let imageUrl = "\(Info.links?.company.cdnString ?? "")/assets/apps/\(app.path ?? "")/icon.png"
CachedAsyncImage(url: URL(string: imageUrl), content: {
CachedAsyncImage(url: URL(string: imageUrl), urlCache: .imageCache, content: {
$0
.resizable()
.frame(width: 74, height: 74)
Expand Down Expand Up @@ -374,7 +375,7 @@ import SwiftUI
HStack {
VStack(alignment: .center) {
ZStack(alignment: .top) {
CachedAsyncImage(url: URL(string: "https://cdn.oversize.design/assets/illustrations/scenes/about-layer3.png"), scale: scale) {
CachedAsyncImage(url: URL(string: "https://cdn.oversize.design/assets/illustrations/scenes/about-layer3.png"), urlCache: .imageCache, scale: scale) {
$0
.resizable()
.scaledToFit()
Expand All @@ -388,7 +389,7 @@ import SwiftUI
}
.offset(y: -offset * 0.1)

CachedAsyncImage(url: URL(string: "https://cdn.oversize.design/assets/illustrations/scenes/about-layer2.png"), scale: scale) {
CachedAsyncImage(url: URL(string: "https://cdn.oversize.design/assets/illustrations/scenes/about-layer2.png"), urlCache: .imageCache, scale: scale) {
$0
.resizable()
.scaledToFit()
Expand All @@ -404,7 +405,7 @@ import SwiftUI
}
}

CachedAsyncImage(url: URL(string: "https://cdn.oversize.design/assets/illustrations/scenes/about-layer1.png"), scale: scale) {
CachedAsyncImage(url: URL(string: "https://cdn.oversize.design/assets/illustrations/scenes/about-layer1.png"), urlCache: .imageCache, scale: scale) {
$0
.resizable()
.scaledToFit()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ struct StoreFeatureDetailView: View {
func iconFetureItem(_ feature: PlistConfiguration.Store.StoreFeature, geometry: GeometryProxy) -> some View {
VStack(spacing: .xxxSmall) {
if let IllustrationURLPath = feature.illustrationURL {
CachedAsyncImage(url: URL(string: IllustrationURLPath)) { image in
CachedAsyncImage(url: URL(string: IllustrationURLPath), urlCache: .imageCache) { image in
image
.resizable()
.scaledToFill()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ struct StoreFeaturesLargeView: View {
func fetureItem(_ feature: PlistConfiguration.Store.StoreFeature) -> some View {
VStack(spacing: .zero) {
if let IllustrationURLPath = feature.illustrationURL {
CachedAsyncImage(url: URL(string: IllustrationURLPath)) { image in
CachedAsyncImage(url: URL(string: IllustrationURLPath), urlCache: .imageCache) { image in
image
.resizable()
.scaledToFill()
Expand Down

0 comments on commit 6430ae9

Please sign in to comment.