Update Nuke (#940)

This commit is contained in:
Alex Grebenyuk 2023-02-19 01:25:57 -05:00 committed by GitHub
parent 20098c8e7a
commit 03d60d2236
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 11 deletions

View file

@ -51,7 +51,7 @@
"location" : "https://github.com/kean/Nuke",
"state" : {
"branch" : "nuke-12",
"revision" : "1e3098adc210edb4b93f62d89c4687301e371a9a"
"revision" : "baccf1b00f458a77a9f9615e415bc4463029cf5e"
}
},
{

View file

@ -55,8 +55,8 @@ public struct AvatarView: View {
.frame(width: size.size.width, height: size.size.height)
} else {
LazyImage(url: url) { state in
if let image = state.imageContainer?.image {
SwiftUI.Image(uiImage: image)
if let image = state.image {
image
.resizable()
.aspectRatio(contentMode: .fit)
} else {

View file

@ -19,8 +19,8 @@ public struct StatusRowCardView: View {
if let imageURL = card.image {
GeometryReader { proxy in
LazyImage(url: imageURL) { state in
if let image = state.imageContainer?.image {
SwiftUI.Image(uiImage: image)
if let image = state.image {
image
.resizable()
.aspectRatio(contentMode: .fill)
.frame(height: 200)

View file

@ -153,8 +153,8 @@ public struct StatusRowMediaPreviewView: View {
switch attachment.supportedType {
case .image:
LazyImage(url: attachment.url) { state in
if let image = state.imageContainer?.image {
SwiftUI.Image(uiImage: image)
if let image = state.image {
image
.resizable()
.aspectRatio(contentMode: .fill)
.frame(width: newSize.width, height: newSize.height)
@ -166,7 +166,7 @@ public struct StatusRowMediaPreviewView: View {
.frame(width: newSize.width, height: newSize.height)
}
}
.processors([ImageProcessors.Resize(size: .init(width: newSize.width, height: newSize.height))])
.processors([.resize(size: .init(width: newSize.width, height: newSize.height))])
.frame(width: newSize.width, height: newSize.height)
case .gifv, .video, .audio:
@ -209,8 +209,8 @@ public struct StatusRowMediaPreviewView: View {
let width = isNotifications ? imageMaxHeight : proxy.frame(in: .local).width
ZStack(alignment: .bottomTrailing) {
LazyImage(url: attachment.previewUrl ?? attachment.url) { state in
if let image = state.imageContainer?.image {
SwiftUI.Image(uiImage: image)
if let image = state.image {
image
.resizable()
.aspectRatio(contentMode: .fill)
.frame(maxWidth: width)
@ -224,7 +224,7 @@ public struct StatusRowMediaPreviewView: View {
.frame(maxWidth: width)
}
}
.processors([ImageProcessors.Resize(size: .init(width: width, height: imageMaxHeight))])
.processors([.resize(size: .init(width: width, height: imageMaxHeight))])
if sensitive {
cornerSensitiveButton
}