From fc62da9c5c2d812970058fef8083611d55abbf7d Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Wed, 18 Jan 2023 05:38:48 +0000 Subject: [PATCH] Only display usage on lcars when in use --- webclient/src/Display.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webclient/src/Display.js b/webclient/src/Display.js index bb1bf62..6587c8a 100644 --- a/webclient/src/Display.js +++ b/webclient/src/Display.js @@ -69,7 +69,8 @@ export function DisplayUsage(props) { return () => clearInterval(interval); }, []); - const showUsage = usage && usage.track.username === usage.username; + const inUse = usage && moment().unix() - usage.track.time <= 60; + const showUsage = usage && inUse && usage.track.username === usage.username; return ( <>