mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 13:33:42 +00:00
Minor image fixes
This commit is contained in:
parent
19d11a3ad9
commit
1980e8a10e
@ -10,6 +10,7 @@ struct ChannelAvatarView: View {
|
||||
@ObservedObject private var subscribedChannels = SubscribedChannelsModel.shared
|
||||
|
||||
@State private var url: URL?
|
||||
@State private var loaded = false
|
||||
|
||||
var body: some View {
|
||||
ZStack(alignment: .bottomTrailing) {
|
||||
@ -19,13 +20,20 @@ struct ChannelAvatarView: View {
|
||||
ThumbnailView(url: url)
|
||||
} else {
|
||||
ZStack {
|
||||
if loaded {
|
||||
Image(systemName: "person.circle")
|
||||
.imageScale(.large)
|
||||
.foregroundColor(.accentColor)
|
||||
} else {
|
||||
Color("PlaceholderColor")
|
||||
}
|
||||
|
||||
if let video, video.isLocal {
|
||||
Image(systemName: video.localStreamImageSystemName)
|
||||
.foregroundColor(.accentColor)
|
||||
.font(.system(size: 20))
|
||||
.contentShape(Rectangle())
|
||||
.imageScale(.small)
|
||||
}
|
||||
}
|
||||
.onAppear(perform: updateURL)
|
||||
@ -47,11 +55,11 @@ struct ChannelAvatarView: View {
|
||||
#endif
|
||||
.clipShape(Circle())
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
}
|
||||
}
|
||||
.imageScale(.small)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func updateURL() {
|
||||
DispatchQueue.global(qos: .userInitiated).async {
|
||||
@ -60,6 +68,7 @@ struct ChannelAvatarView: View {
|
||||
self.url = url
|
||||
}
|
||||
}
|
||||
self.loaded = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ struct VideoDetails: View {
|
||||
)
|
||||
} else {
|
||||
Circle()
|
||||
.foregroundColor(Color(white: 0.6).opacity(0.5))
|
||||
.foregroundColor(Color("PlaceholderColor"))
|
||||
}
|
||||
}
|
||||
.frame(width: 40, height: 40)
|
||||
|
Loading…
Reference in New Issue
Block a user