Only show the new icon card on iPad / macOS

This commit is contained in:
Thomas Ricouard 2023-12-31 13:43:13 +01:00
parent 9b70519798
commit b4757621f2

View file

@ -48,7 +48,8 @@ public struct StatusRowCardView: View {
if let title = card.title, let url = URL(string: card.url) {
VStack(alignment: .leading) {
let sitesWithIcons = ["apps.apple.com", "music.apple.com", "open.spotify.com"]
if let host = url.host(), sitesWithIcons.contains(host) {
if (UIDevice.current.userInterfaceIdiom == .pad || UIDevice.current.userInterfaceIdiom == .mac),
let host = url.host(), sitesWithIcons.contains(host) {
iconLinkPreview(title, url)
} else {
defaultLinkPreview(title, url)