From: Michael Prager Date: Sat, 14 May 2011 12:22:06 +0000 (+0200) Subject: fixed settings being lost when updating to a newer version. Also updated readme and... X-Git-Url: https://code.delx.au/comingnext/commitdiff_plain/a965ef019d26c7cd4b21922d6698a14ef166f2e6 fixed settings being lost when updating to a newer version. Also updated readme and fixed linebreak mixups in readme --- diff --git a/Readme.txt b/Readme.txt index 390264c..bd5ab8e 100644 --- a/Readme.txt +++ b/Readme.txt @@ -262,9 +262,10 @@ Changelog: - fixed calendar indicators not showing in some cases - fixed homescreen widget not updating properly on N8 - added help menu -1.32 () by Michael Prager - - improved performance and battery life (reloading and sorting calendar - data has been reduced) - - fixed and improved spanish translation - - added "enableLogging" option which needs to be turned on if you want to - generate debug logs +1.32 () by Michael Prager + - improved performance and battery life (reloading and sorting calendar + data has been reduced) + - fixed settings being lost when updating to a newer version + - fixed and improved spanish translation + - added "enableLogging" option which needs to be turned on if you want to + generate debug logs diff --git a/comingNext/index.html b/comingNext/index.html index 10e2309..48610ac 100644 --- a/comingNext/index.html +++ b/comingNext/index.html @@ -1066,8 +1066,8 @@ function getSettingsCalEntryId() var listFiltering = { Type:'CalendarEntry', Filter:{ - StartRange: new Date(2000, 0, 1), - EndRange: new Date(2000, 0, 1), + StartRange: new Date(1999, 11, 30), // note: due to Nokia's buggy calendar API, the settings event can be on 01.01.2000 AND on 31.12.1999, depending on when the calendar entry was created (in summer or winter). It is not even possible to narrow the search down to these two days (probably because of DST offsets). So we're looking for an event between 30.12.1999 and 02.01.2000! + EndRange: new Date(2000, 0, 2), SearchText: 'ComingNext Settings|', Type: 'DayEvent' } @@ -1139,6 +1139,10 @@ function loadSettings() var pair = stringlist[i].split('='); var key = pair[0]; var value = pair[1]; + if (key == null || value == null || config[key] == null) { + log('Warning: unknown or invalid setting: ' + stringlist[i]); + continue; + } log('stringlist: ' + key + '=\'' + value + '\''); if (config[key].Type == 'Int') { config[key].Value = Number(value);