From b756874d307000090f91f7bc6b1eba5b7d925c98 Mon Sep 17 00:00:00 2001 From: Eugene Alvin Villar Date: Sun, 2 May 2021 23:39:58 +0800 Subject: [PATCH] Record when app was first opened --- app/src/main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main.js b/app/src/main.js index c9f7de7..da60bca 100644 --- a/app/src/main.js +++ b/app/src/main.js @@ -160,6 +160,11 @@ function initApp() { RegionFilterValue = localStorage.getItem('region-filter' ); DistanceFilterValue = localStorage.getItem('distance-filter' ); if (DistanceFilterValue) DistanceFilterValue = parseInt(DistanceFilterValue); + + // Set app first open time + if (!localStorage.getItem('PN-first-open')) { + localStorage.setItem('PN-first-open', new Date().getTime()); + } } // -----------------------------------------------------------------------------