mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Use only compound icons in the TimelineReplyView
This commit is contained in:
@@ -46,7 +46,7 @@ struct TimelineReplyView: View {
|
|||||||
ReplyView(sender: sender,
|
ReplyView(sender: sender,
|
||||||
plainBody: content.caption ?? content.filename,
|
plainBody: content.caption ?? content.filename,
|
||||||
formattedBody: content.formattedCaption,
|
formattedBody: content.formattedCaption,
|
||||||
icon: .init(kind: .systemIcon("waveform")))
|
icon: .init(kind: .icon(\.audio)))
|
||||||
case .emote(let content):
|
case .emote(let content):
|
||||||
ReplyView(sender: sender,
|
ReplyView(sender: sender,
|
||||||
plainBody: content.body,
|
plainBody: content.body,
|
||||||
@@ -119,7 +119,6 @@ struct TimelineReplyView: View {
|
|||||||
struct Icon {
|
struct Icon {
|
||||||
enum Kind {
|
enum Kind {
|
||||||
case mediaSource(MediaSourceProxy)
|
case mediaSource(MediaSourceProxy)
|
||||||
case systemIcon(String)
|
|
||||||
case iconAsset(ImageAsset)
|
case iconAsset(ImageAsset)
|
||||||
case icon(KeyPath<CompoundIcons, Image>)
|
case icon(KeyPath<CompoundIcons, Image>)
|
||||||
}
|
}
|
||||||
@@ -173,15 +172,10 @@ struct TimelineReplyView: View {
|
|||||||
size: .init(width: imageContainerSize,
|
size: .init(width: imageContainerSize,
|
||||||
height: imageContainerSize),
|
height: imageContainerSize),
|
||||||
mediaProvider: context.mediaProvider) {
|
mediaProvider: context.mediaProvider) {
|
||||||
Image(systemName: "photo")
|
CompoundIcon(\.image)
|
||||||
.padding(4.0)
|
.padding(4.0)
|
||||||
}
|
}
|
||||||
.aspectRatio(contentMode: .fill)
|
.aspectRatio(contentMode: .fill)
|
||||||
case .systemIcon(let systemIconName):
|
|
||||||
Image(systemName: systemIconName)
|
|
||||||
.resizable()
|
|
||||||
.aspectRatio(contentMode: .fit)
|
|
||||||
.padding(8.0)
|
|
||||||
case .iconAsset(let asset):
|
case .iconAsset(let asset):
|
||||||
Image(asset: asset)
|
Image(asset: asset)
|
||||||
.resizable()
|
.resizable()
|
||||||
|
|||||||
Reference in New Issue
Block a user