mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-23 13:28:50 +01:00
Update to Nuke 12 (Beta 1) (#924)
* Install Nuke from nuke-12 branch * Fixes --------- Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
This commit is contained in:
parent
d20423d547
commit
425a4eef4f
@ -50,8 +50,8 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/kean/Nuke",
|
||||
"state" : {
|
||||
"revision" : "67bd45931180f652159e3342575277a7f197b3ab",
|
||||
"version" : "11.6.2"
|
||||
"branch" : "nuke-12",
|
||||
"revision" : "1e3098adc210edb4b93f62d89c4687301e371a9a"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -42,8 +42,11 @@ struct AccountDetailHeaderView: View {
|
||||
LazyImage(url: account.header) { state in
|
||||
if let image = state.image {
|
||||
image
|
||||
.resizingMode(.aspectFill)
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.overlay(account.haveHeader ? .black.opacity(0.50) : .clear)
|
||||
.frame(height: Constants.headerHeight)
|
||||
.clipped()
|
||||
} else if state.isLoading {
|
||||
theme.secondaryBackgroundColor
|
||||
.frame(height: Constants.headerHeight)
|
||||
|
@ -125,16 +125,22 @@ struct ConversationMessageView: View {
|
||||
}
|
||||
|
||||
private func makeMediaView(_ attachement: MediaAttachment) -> some View {
|
||||
LazyImage(url: attachement.url) { state in
|
||||
if let image = state.image {
|
||||
image
|
||||
.resizingMode(.aspectFill)
|
||||
.cornerRadius(8)
|
||||
.padding(8)
|
||||
} else if state.isLoading {
|
||||
RoundedRectangle(cornerRadius: 8)
|
||||
.fill(Color.gray)
|
||||
.frame(height: 200)
|
||||
GeometryReader { proxy in
|
||||
LazyImage(url: attachement.url) { state in
|
||||
if let image = state.image {
|
||||
image
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.frame(height: 200)
|
||||
.frame(maxWidth: proxy.frame(in: .local).width)
|
||||
.clipped()
|
||||
.cornerRadius(8)
|
||||
.padding(8)
|
||||
} else if state.isLoading {
|
||||
RoundedRectangle(cornerRadius: 8)
|
||||
.fill(Color.gray)
|
||||
.frame(height: 200)
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(height: 200)
|
||||
|
@ -19,7 +19,7 @@ let package = Package(
|
||||
.package(name: "Models", path: "../Models"),
|
||||
.package(name: "Env", path: "../Env"),
|
||||
.package(url: "https://github.com/markiv/SwiftUI-Shimmer", exact: "1.1.0"),
|
||||
.package(url: "https://github.com/kean/Nuke", from: "11.6.0"),
|
||||
.package(url: "https://github.com/kean/Nuke", branch: "nuke-12"),
|
||||
.package(url: "https://github.com/divadretlaw/EmojiText", from: "1.1.0"),
|
||||
],
|
||||
targets: [
|
||||
|
@ -243,7 +243,8 @@ struct StatusEditorAccessoryView: View {
|
||||
LazyImage(url: emoji.url) { state in
|
||||
if let image = state.image {
|
||||
image
|
||||
.resizingMode(.aspectFit)
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.frame(width: 40, height: 40)
|
||||
} else if state.isLoading {
|
||||
Rectangle()
|
||||
|
@ -100,7 +100,8 @@ struct StatusEditorMediaView: View {
|
||||
LazyImage(url: url) { state in
|
||||
if let image = state.image {
|
||||
image
|
||||
.resizingMode(.aspectFill)
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.frame(width: 150, height: 150)
|
||||
} else {
|
||||
placeholderView
|
||||
|
Loading…
Reference in New Issue
Block a user