Skip to content

Commit

Permalink
chore(deps): update dependency onevcat/kingfisher to 8.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
EnesKaraosman committed Sep 21, 2024
1 parent 766bb72 commit 79027c8
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"originHash" : "5b4b29c1d60c84b81b9ecde166ab224a4e4d4068063e21db2aae21b52f89aacd",
"pins" : [
{
"identity" : "kingfisher",
"kind" : "remoteSourceControl",
"location" : "https://github.com/onevcat/Kingfisher.git",
"state" : {
"revision" : "5b92f029fab2cce44386d28588098b5be0824ef5",
"version" : "7.11.0"
"revision" : "3340001633525fd68c53d3a359e3c118797ad08e",
"version" : "8.0.2"
}
},
{
Expand All @@ -28,5 +29,5 @@
}
}
],
"version" : 2
"version" : 3
}
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/onevcat/Kingfisher.git",
"state" : {
"revision" : "5b92f029fab2cce44386d28588098b5be0824ef5",
"version" : "7.11.0"
"revision" : "3340001633525fd68c53d3a359e3c118797ad08e",
"version" : "8.0.2"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let package = Package(
),
],
dependencies: [
.package(url: "https://github.com/onevcat/Kingfisher.git", from: "7.12.0"),
.package(url: "https://github.com/onevcat/Kingfisher.git", from: "8.0.2"),
.package(url: "https://github.com/EnesKaraosman/SwiftUIEKtensions.git", from: "0.4.0"),
.package(url: "https://github.com/dkk/WrappingHStack.git", from: "2.2.11")
],
Expand Down
2 changes: 2 additions & 0 deletions Sources/SwiftyChat/MessageViews/ImageMessageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ struct ImageLoadingKindCell: View {
imageView
}

@MainActor
@ViewBuilder
private var imageView: some View {
switch imageLoadingType {
Expand All @@ -53,6 +54,7 @@ struct ImageLoadingKindCell: View {
.frame(width: width, height: height)
}

@MainActor
private func remoteImage(url: URL) -> some View {
KFAnimatedImage(url)
.cacheOriginalImage()
Expand Down
9 changes: 7 additions & 2 deletions Sources/SwiftyChatMock/MessageMocker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,20 @@ public struct MessageMocker {
case video
case custom
}

private static func avatarUrl(_ id: Int) -> URL? {
let string = "https://github.com/radically-straightforward/radically-straightforward/blob/main/examples/avatars/png/\(id).png?raw=true"
return URL(string: string)
}

public static var sender: ChatUserItem = .init(
userName: "Sender",
avatarURL: URL(string: "https://leafac.github.io/fake-avatars/avatars/png/\(Int.random(in: 1...250)).png")
avatarURL: avatarUrl(Int.random(in: 1...250))
)

public static var chatbot: ChatUserItem = .init(
userName: "Chatbot",
avatarURL: URL(string: "https://leafac.github.io/fake-avatars/avatars/png/\(Int.random(in: 1...250)).png")
avatarURL: avatarUrl(Int.random(in: 1...250))
)

private static var randomUser: ChatUserItem {
Expand Down

0 comments on commit 79027c8

Please sign in to comment.