From 84547ee1c12ff3294b37c5412ad2a21ae03656e8 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 15 Jul 2021 19:53:40 -0400 Subject: [PATCH] Reduce spurious in-window appearances. --- .../Mac/Clock Signal/Documents/MachineDocument.swift | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift b/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift index fb18a63e4..4411f1a27 100644 --- a/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift +++ b/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift @@ -701,7 +701,7 @@ class MachineDocument: } // Show or hide activity view as per current state. - updateActivityViewVisibility() + updateActivityViewVisibility(true) } } @@ -746,7 +746,7 @@ class MachineDocument: } } - private func updateActivityViewVisibility() { + private func updateActivityViewVisibility(_ isAppLaunch : Bool = false) { if let window = self.windowControllers.first?.window, let activityFader = self.activityFader { // If in a window, show the activity view transiently to // acknowledge changes of state. In full screen show it @@ -758,11 +758,10 @@ class MachineDocument: } else { activityFader.animateIn() } - } else { + } else if !isAppLaunch { activityFader.showTransiently(for: 1.0) } - let litLEDs = self.leds.filter { $0.value.isLit } if litLEDs.isEmpty || !window.styleMask.contains(.fullScreen) { activityFader.animateOut(delay: window.styleMask.contains(.fullScreen) ? 0.2 : 0.0)