mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Update cached async image
This commit is contained in:
parent
8bd9beebc6
commit
301c5984de
3 changed files with 5 additions and 3 deletions
|
|
@ -74,7 +74,7 @@ public struct GridCard: View {
|
|||
|
||||
ZStack(alignment: .bottomLeading) {
|
||||
if let imageURL = item.imageURL {
|
||||
AsyncImage(url: imageURL) { phase in
|
||||
CachedAsyncImage(url: imageURL) { phase in
|
||||
switch phase {
|
||||
case .empty:
|
||||
Color.systemBackground
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public struct LibraryFeatureCard: View {
|
|||
var imageBox: some View {
|
||||
ZStack(alignment: .bottomLeading) {
|
||||
if let imageURL = item.imageURL {
|
||||
AsyncImage(url: imageURL) { phase in
|
||||
CachedAsyncImage(url: imageURL) { phase in
|
||||
switch phase {
|
||||
case .empty:
|
||||
Color.systemBackground
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
//
|
||||
// File.swift
|
||||
// CachedAsyncImage.swift
|
||||
//
|
||||
//
|
||||
// Created by Jackson Harper on 11/8/23.
|
||||
//
|
||||
|
||||
// from: https://github.com/pitt500/Pokedex
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct CachedAsyncImage<Content>: View where Content: View {
|
||||
Loading…
Reference in a new issue