From 7d670c5b63db44e32d33b7db3495b4d792866f86 Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Tue, 2 Jan 2024 19:14:45 -0800 Subject: Fix banners not loading. First crack at adding a classic icon set with icons painsakenly pulled from the original Hotline client. May try to "remaster" these somehow. --- Hotline/macOS/ChatView.swift | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'Hotline/macOS/ChatView.swift') diff --git a/Hotline/macOS/ChatView.swift b/Hotline/macOS/ChatView.swift index 4399de6..d94634a 100644 --- a/Hotline/macOS/ChatView.swift +++ b/Hotline/macOS/ChatView.swift @@ -38,10 +38,21 @@ struct ChatView: View { if msg.type == .agreement { VStack(alignment: .center, spacing: 16) { - FileImageView() - .environment(self.model) - .frame(maxWidth: 468.0) - .clipShape(RoundedRectangle(cornerRadius: 3)) + if let bannerImage = self.model.bannerImage { + #if os(macOS) + Image(nsImage: bannerImage) + .resizable() + .scaledToFit() + .frame(maxWidth: 468.0) + .clipShape(RoundedRectangle(cornerRadius: 3)) + #elseif os(iOS) + Image(uiImage: bannerImage) + .resizable() + .scaledToFit() + .frame(maxWidth: 468.0) + .clipShape(RoundedRectangle(cornerRadius: 3)) + #endif + } VStack(spacing: 0) { ScrollView(.vertical) { -- cgit