From b9a7e76bebd2c4983b246038c5b800f42658e793 Mon Sep 17 00:00:00 2001 From: Adrian Kirk Date: Sat, 8 Oct 2022 20:21:35 +0100 Subject: [PATCH] Sliding Clock: get rid of the setup variables after the init to reduce the memory footprint --- apps/slidingtext/slidingtext.js | 2 +- apps/slidingtext/slidingtext.locale.en.js | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/slidingtext/slidingtext.js b/apps/slidingtext/slidingtext.js index 82222640c..6ea0cfd65 100644 --- a/apps/slidingtext/slidingtext.js +++ b/apps/slidingtext/slidingtext.js @@ -314,7 +314,6 @@ function initDisplay(settings) { row_displays.push(create_row(row_type,j)); } }); - initComplete(); } function mergeMaps(map1,map2){ @@ -733,6 +732,7 @@ function loadSettings() { initDisplay(); updateColorScheme(); } + initComplete(); } function button3pressed() { diff --git a/apps/slidingtext/slidingtext.locale.en.js b/apps/slidingtext/slidingtext.locale.en.js index dbb01c5e2..73e3d23b0 100644 --- a/apps/slidingtext/slidingtext.locale.en.js +++ b/apps/slidingtext/slidingtext.locale.en.js @@ -17,7 +17,13 @@ class EnglishDateFormatter extends DateFormatter { const month = monthToText(date); return [hours_txt,mins_txt[0],mins_txt[1],day_of_week,date_txt,month]; } - defaultRowTypes(){ + defaultRowTypes() { + return { + small: {size: 'ssmall'} + }; + } + + defaultRowDefs(){ return [ { type: 'large', @@ -39,12 +45,6 @@ class EnglishDateFormatter extends DateFormatter { } ]; } - - defaultRowDefs(){ - return { - small: {size: 'ssmall'} - }; - } } module.exports = EnglishDateFormatter; \ No newline at end of file