From 96e654dc34995e8d51ddfee23b4390983aa9e2c0 Mon Sep 17 00:00:00 2001 From: redstrate <54911369+redstrate@users.noreply.github.com> Date: Sun, 24 May 2020 22:01:06 -0400 Subject: [PATCH] Remove extra comma from post title and fix catalyst title issue --- Gallery/PostViewController.swift | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Gallery/PostViewController.swift b/Gallery/PostViewController.swift index 872d716..d1c290f 100644 --- a/Gallery/PostViewController.swift +++ b/Gallery/PostViewController.swift @@ -22,8 +22,8 @@ class PostViewController: UIViewController, UIPopoverPresentationControllerDeleg return } - for tag in postObject.tags! { - if !tagList.isEmpty { + for (i, tag) in postObject.tags!.enumerated() { + if !tagList.isEmpty && i != postObject.tags!.count - 1 { tagList += ", " } @@ -59,11 +59,17 @@ class PostViewController: UIViewController, UIPopoverPresentationControllerDeleg } } + #if !targetEnvironment(macCatalyst) updateWindowTitle() + #endif } override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) + + #if targetEnvironment(macCatalyst) + updateWindowTitle() + #endif } @objc func closePopup() {