Update Nuke (#940)
This commit is contained in:
parent
20098c8e7a
commit
03d60d2236
|
@ -51,7 +51,7 @@
|
|||
"location" : "https://github.com/kean/Nuke",
|
||||
"state" : {
|
||||
"branch" : "nuke-12",
|
||||
"revision" : "1e3098adc210edb4b93f62d89c4687301e371a9a"
|
||||
"revision" : "baccf1b00f458a77a9f9615e415bc4463029cf5e"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue