From 25058dd92de108c46d141e135b866d2dd4716834 Mon Sep 17 00:00:00 2001 From: Keerthy Date: Fri, 1 Mar 2024 12:41:13 +0530 Subject: [PATCH 1/2] self.isVisibleOnScreen for isActive --- VDS/Components/Loader/Loader.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VDS/Components/Loader/Loader.swift b/VDS/Components/Loader/Loader.swift index baf6ecdb..3b4c8ebd 100644 --- a/VDS/Components/Loader/Loader.swift +++ b/VDS/Components/Loader/Loader.swift @@ -80,7 +80,7 @@ open class Loader: View { super.updateView() icon.color = iconColorConfiguration.getColor(self) icon.customSize = size - if isActive { + if isActive, self.isVisibleOnScreen { startAnimating() } else { stopAnimating() From 6e8fe4ea91625d847489cadfe477eb00e1fabcbf Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 1 Mar 2024 09:14:13 -0600 Subject: [PATCH 2/2] use && instead of comma (,) if you don't use if let Signed-off-by: Matt Bruce --- VDS/Components/Loader/Loader.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VDS/Components/Loader/Loader.swift b/VDS/Components/Loader/Loader.swift index 3b4c8ebd..1cfb02c4 100644 --- a/VDS/Components/Loader/Loader.swift +++ b/VDS/Components/Loader/Loader.swift @@ -80,7 +80,7 @@ open class Loader: View { super.updateView() icon.color = iconColorConfiguration.getColor(self) icon.customSize = size - if isActive, self.isVisibleOnScreen { + if isActive && isVisibleOnScreen { startAnimating() } else { stopAnimating()