diff --git a/app/build.gradle b/app/build.gradle index cd0ab5b9..d968bbe9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,8 +10,8 @@ android { applicationId "com.example.weathermaster" minSdk 22 targetSdk 33 - versionCode 80 - versionName "1.8.8 (W)" + versionCode 82 + versionName "1.8.8.2 (W)" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json index 4665430a..d12167f3 100644 --- a/app/release/output-metadata.json +++ b/app/release/output-metadata.json @@ -11,8 +11,8 @@ "type": "SINGLE", "filters": [], "attributes": [], - "versionCode": 79, - "versionName": "1.8.7 (W)", + "versionCode": 82, + "versionName": "1.8.8.2 (W)", "outputFile": "app-release.apk" } ], diff --git a/app/src/main/assets/app/apiKeysRotation.js b/app/src/main/assets/app/apiKeysRotation.js index 8b137891..9542686d 100644 --- a/app/src/main/assets/app/apiKeysRotation.js +++ b/app/src/main/assets/app/apiKeysRotation.js @@ -1 +1 @@ - +// No need \ No newline at end of file diff --git a/app/src/main/assets/app/app.js b/app/src/main/assets/app/app.js index 88efcc6f..0107bd69 100644 --- a/app/src/main/assets/app/app.js +++ b/app/src/main/assets/app/app.js @@ -2090,20 +2090,24 @@ function hideLoader() { function refreshWeather() { if (navigator.onLine) { + document.querySelector('.no_touch_screen').hidden = false; + const latSend = localStorage.getItem('currentLat') const longSend = localStorage.getItem('currentLong') const CurrentLocationName = localStorage.getItem('CurrentLocationName'); DecodeWeather(latSend, longSend, CurrentLocationName, `Refreshed_${CurrentLocationName}`) - // setTimeout(() =>{ - // sendThemeToAndroid('StopRefresh') - // }, 1000) + } else { + setTimeout(() =>{ + document.querySelector('.no_touch_screen').hidden = true; + sendThemeToAndroid("StopRefreshingLoader"); + }, 1000) return } } @@ -2211,7 +2215,7 @@ checkNoInternet(); document.addEventListener('DOMContentLoaded', async function () { - const currentVersion = 'v1.8.8'; + const currentVersion = 'v1.8.8.2'; const githubRepo = 'PranshulGG/WeatherMaster'; const releasesUrl = `https://api.github.com/repos/${githubRepo}/releases/latest`; @@ -2453,8 +2457,12 @@ function ReturnHomeLocation() { } setTimeout(() => { - document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataMetTimstamp)}`; - }, 1000); + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); @@ -2524,8 +2532,12 @@ function ReturnHomeLocation() { } setTimeout(() => { - document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(dataTimstamp)}`; - }, 1000); + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); } else if(localStorage.getItem('selectedMainWeatherProvider') === 'meteoFrance'){ const renderFromSavedData = JSON.parse(localStorage.getItem(`WeatherDataMeteoFrance_${Locations.name}`)); @@ -2562,10 +2574,13 @@ function ReturnHomeLocation() { } - setTimeout(() => { - document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 1200); + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); localStorage.setItem('currentLong', Locations.lon) localStorage.setItem('currentLat', Locations.lat) @@ -2619,9 +2634,13 @@ function ReturnHomeLocation() { } - setTimeout(() => { - document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); localStorage.setItem('currentLong', Locations.lon) @@ -2676,9 +2695,13 @@ function ReturnHomeLocation() { } - setTimeout(() => { - document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); localStorage.setItem('currentLong', Locations.lon) @@ -2733,9 +2756,13 @@ function ReturnHomeLocation() { } - setTimeout(() => { - document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); localStorage.setItem('currentLong', Locations.lon) @@ -2790,9 +2817,13 @@ function ReturnHomeLocation() { } - setTimeout(() => { - document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); localStorage.setItem('currentLong', Locations.lon) @@ -2847,9 +2878,13 @@ function ReturnHomeLocation() { } - setTimeout(() => { - document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); localStorage.setItem('currentLong', Locations.lon) @@ -2904,9 +2939,13 @@ function ReturnHomeLocation() { } - setTimeout(() => { - document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); localStorage.setItem('currentLong', Locations.lon) @@ -2961,9 +3000,13 @@ function ReturnHomeLocation() { } - setTimeout(() => { - document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); localStorage.setItem('currentLong', Locations.lon) @@ -3018,9 +3061,13 @@ function ReturnHomeLocation() { } - setTimeout(() => { - document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); localStorage.setItem('currentLong', Locations.lon) @@ -3075,9 +3122,13 @@ function ReturnHomeLocation() { } - setTimeout(() => { - document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); localStorage.setItem('currentLong', Locations.lon) @@ -3132,9 +3183,13 @@ function ReturnHomeLocation() { } - setTimeout(() => { - document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); localStorage.setItem('currentLong', Locations.lon) @@ -3189,9 +3244,13 @@ function ReturnHomeLocation() { } - setTimeout(() => { - document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); localStorage.setItem('currentLong', Locations.lon) @@ -3254,7 +3313,11 @@ function ReturnHomeLocation() { setTimeout(() => { document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); @@ -3491,8 +3554,12 @@ function LoadLocationOnRequest(lat, lon, name) { } setTimeout(() => { - document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataMetTimstamp)}`; - }, 1000); + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); hideLoader() @@ -3559,8 +3626,12 @@ function LoadLocationOnRequest(lat, lon, name) { } setTimeout(() => { - document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(dataTimstamp)}`; - }, 1000); + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); hideLoader() @@ -3601,7 +3672,11 @@ function LoadLocationOnRequest(lat, lon, name) { setTimeout(() => { document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); @@ -3659,7 +3734,11 @@ function LoadLocationOnRequest(lat, lon, name) { setTimeout(() => { document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); @@ -3717,7 +3796,11 @@ function LoadLocationOnRequest(lat, lon, name) { setTimeout(() => { document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); @@ -3775,7 +3858,11 @@ function LoadLocationOnRequest(lat, lon, name) { setTimeout(() => { document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); @@ -3833,7 +3920,11 @@ function LoadLocationOnRequest(lat, lon, name) { setTimeout(() => { document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); @@ -3891,7 +3982,11 @@ function LoadLocationOnRequest(lat, lon, name) { setTimeout(() => { document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); localStorage.setItem('currentLong', Locations.lon) @@ -3948,7 +4043,11 @@ function LoadLocationOnRequest(lat, lon, name) { setTimeout(() => { document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); @@ -4006,8 +4105,11 @@ function LoadLocationOnRequest(lat, lon, name) { setTimeout(() => { document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + }, 1200); + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); localStorage.setItem('currentLong', lon) localStorage.setItem('currentLat', lat) @@ -4063,7 +4165,11 @@ function LoadLocationOnRequest(lat, lon, name) { setTimeout(() => { document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); localStorage.setItem('currentLong', lon) @@ -4120,7 +4226,11 @@ function LoadLocationOnRequest(lat, lon, name) { setTimeout(() => { document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); @@ -4178,9 +4288,11 @@ function LoadLocationOnRequest(lat, lon, name) { setTimeout(() => { document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); - + }, 1200); + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); localStorage.setItem('currentLong', lon) localStorage.setItem('currentLat', lat) @@ -4236,7 +4348,11 @@ function LoadLocationOnRequest(lat, lon, name) { setTimeout(() => { document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; - }, 1000); + }, 1200); + + setTimeout(() => { + document.getElementById('last_updated').innerHTML = `Updated, ${timeAgo(renderFromSavedDataTimstamp)}`; + }, 2400); diff --git a/app/src/main/assets/app/navigate.js b/app/src/main/assets/app/navigate.js index 1ea6b3b1..c9f1366a 100644 --- a/app/src/main/assets/app/navigate.js +++ b/app/src/main/assets/app/navigate.js @@ -1,3 +1,7 @@ + + + + window.transitionToPage = function(href) { document.querySelector('body').style.opacity = '0'; @@ -11,6 +15,10 @@ window.transitionToPage = function(href) { } + + + + document.addEventListener('DOMContentLoaded', function(event) { document.querySelector('body').style.opacity = '1'; diff --git a/app/src/main/assets/index.html b/app/src/main/assets/index.html index e39536e2..58b28e47 100644 --- a/app/src/main/assets/index.html +++ b/app/src/main/assets/index.html @@ -20,6 +20,7 @@ +
diff --git a/app/src/main/assets/pages/AboutPage.html b/app/src/main/assets/pages/AboutPage.html index 72703a35..669ae26b 100644 --- a/app/src/main/assets/pages/AboutPage.html +++ b/app/src/main/assets/pages/AboutPage.html @@ -204,7 +204,7 @@

Weather
Master

- 1.8.8 (W) + 1.8.8.2 (W)
@@ -355,7 +355,7 @@ document.getElementById('checkUpdatesBtn').addEventListener('click', async function () { - const currentVersion = 'v1.8.8'; + const currentVersion = 'v1.8.8.2'; const githubRepo = 'PranshulGG/WeatherMaster'; const releasesUrl = `https://api.github.com/repos/${githubRepo}/releases/latest`; diff --git a/app/src/main/assets/providers/bomAustralia.js b/app/src/main/assets/providers/bomAustralia.js index e219220a..ee012055 100644 --- a/app/src/main/assets/providers/bomAustralia.js +++ b/app/src/main/assets/providers/bomAustralia.js @@ -9,6 +9,7 @@ function FetchbomAustralia(lat, lon, timezone, suggestionText, refreshValue) { .then(data => { localStorage.setItem(`WeatherDatabomAustralia_${suggestionText}`, JSON.stringify(data, new Date().toISOString())) - + + renderLatestData(lat, lon, suggestionText, refreshValue) }) } \ No newline at end of file diff --git a/app/src/main/assets/providers/cmaChina.js b/app/src/main/assets/providers/cmaChina.js index b21c33c9..b01043fb 100644 --- a/app/src/main/assets/providers/cmaChina.js +++ b/app/src/main/assets/providers/cmaChina.js @@ -9,6 +9,7 @@ function FetchcmaChina(lat, lon, timezone, suggestionText, refreshValue) { .then(data => { localStorage.setItem(`WeatherDatacmaChina_${suggestionText}`, JSON.stringify(data, new Date().toISOString())) - + + renderLatestData(lat, lon, suggestionText, refreshValue) }) } \ No newline at end of file diff --git a/app/src/main/assets/providers/dmiDenmark.js b/app/src/main/assets/providers/dmiDenmark.js index b2744d31..954b5713 100644 --- a/app/src/main/assets/providers/dmiDenmark.js +++ b/app/src/main/assets/providers/dmiDenmark.js @@ -9,6 +9,7 @@ function FetchdmiDenmark(lat, lon, timezone, suggestionText, refreshValue) { .then(data => { localStorage.setItem(`WeatherDatadmiDenmark_${suggestionText}`, JSON.stringify(data, new Date().toISOString())) - + + renderLatestData(lat, lon, suggestionText, refreshValue) }) } \ No newline at end of file diff --git a/app/src/main/assets/providers/dwdGermany.js b/app/src/main/assets/providers/dwdGermany.js index 8a563f68..0c4aff04 100644 --- a/app/src/main/assets/providers/dwdGermany.js +++ b/app/src/main/assets/providers/dwdGermany.js @@ -8,6 +8,7 @@ function FetchDWDGermany(lat, lon, timezone, suggestionText, refreshValue) { .then(data => { localStorage.setItem(`WeatherDataDWDGermany_${suggestionText}`, JSON.stringify(data, new Date().toISOString())) - + + renderLatestData(lat, lon, suggestionText, refreshValue) }) } \ No newline at end of file diff --git a/app/src/main/assets/providers/ecmwf.js b/app/src/main/assets/providers/ecmwf.js index 170c0bd6..d34882b3 100644 --- a/app/src/main/assets/providers/ecmwf.js +++ b/app/src/main/assets/providers/ecmwf.js @@ -9,6 +9,7 @@ function FetchECMWF(lat, lon, timezone, suggestionText, refreshValue) { .then(data => { localStorage.setItem(`WeatherDataECMWF_${suggestionText}`, JSON.stringify(data, new Date().toISOString())) - + + renderLatestData(lat, lon, suggestionText, refreshValue) }) } \ No newline at end of file diff --git a/app/src/main/assets/providers/gemCanada.js b/app/src/main/assets/providers/gemCanada.js index 63beaea7..e772c539 100644 --- a/app/src/main/assets/providers/gemCanada.js +++ b/app/src/main/assets/providers/gemCanada.js @@ -9,6 +9,8 @@ function FetchgemCanada(lat, lon, timezone, suggestionText, refreshValue) { .then(data => { localStorage.setItem(`WeatherDatagemCanada_${suggestionText}`, JSON.stringify(data, new Date().toISOString())) - + + + renderLatestData(lat, lon, suggestionText, refreshValue) }) } \ No newline at end of file diff --git a/app/src/main/assets/providers/jmaJapan.js b/app/src/main/assets/providers/jmaJapan.js index 9a247d8e..a0ffd4c8 100644 --- a/app/src/main/assets/providers/jmaJapan.js +++ b/app/src/main/assets/providers/jmaJapan.js @@ -9,6 +9,8 @@ function FetchJMAJapan(lat, lon, timezone, suggestionText, refreshValue) { .then(data => { localStorage.setItem(`WeatherDataJMAJapan_${suggestionText}`, JSON.stringify(data, new Date().toISOString())) - + + + renderLatestData(lat, lon, suggestionText, refreshValue) }) } \ No newline at end of file diff --git a/app/src/main/assets/providers/knmiNetherlands.js b/app/src/main/assets/providers/knmiNetherlands.js index 5c3a7537..cc200c94 100644 --- a/app/src/main/assets/providers/knmiNetherlands.js +++ b/app/src/main/assets/providers/knmiNetherlands.js @@ -9,6 +9,7 @@ function FetchknmiNetherlands(lat, lon, timezone, suggestionText, refreshValue) .then(data => { localStorage.setItem(`WeatherDataknmiNetherlands_${suggestionText}`, JSON.stringify(data, new Date().toISOString())) - + + renderLatestData(lat, lon, suggestionText, refreshValue) }) } \ No newline at end of file diff --git a/app/src/main/assets/providers/meteo-france.js b/app/src/main/assets/providers/meteo-france.js index 730df308..ac807b5e 100644 --- a/app/src/main/assets/providers/meteo-france.js +++ b/app/src/main/assets/providers/meteo-france.js @@ -9,6 +9,8 @@ function FetchMeteoFrance(lat, lon, timezone, suggestionText, refreshValue) { .then(data => { localStorage.setItem(`WeatherDataMeteoFrance_${suggestionText}`, JSON.stringify(data, new Date().toISOString())) - + + + renderLatestData(lat, lon, suggestionText, refreshValue) }) } \ No newline at end of file diff --git a/app/src/main/assets/providers/noaaUS.js b/app/src/main/assets/providers/noaaUS.js index 9d03ff39..e77fdc82 100644 --- a/app/src/main/assets/providers/noaaUS.js +++ b/app/src/main/assets/providers/noaaUS.js @@ -9,6 +9,8 @@ function FetchNOAAUS(lat, lon, timezone, suggestionText, refreshValue) { .then(data => { localStorage.setItem(`WeatherDataNOAAUS_${suggestionText}`, JSON.stringify(data, new Date().toISOString())) - + + + renderLatestData(lat, lon, suggestionText, refreshValue) }) } \ No newline at end of file diff --git a/app/src/main/assets/providers/ukMetOffice.js b/app/src/main/assets/providers/ukMetOffice.js index b3f8d354..faab4613 100644 --- a/app/src/main/assets/providers/ukMetOffice.js +++ b/app/src/main/assets/providers/ukMetOffice.js @@ -9,6 +9,7 @@ function FetchukMetOffice(lat, lon, timezone, suggestionText, refreshValue) { .then(data => { localStorage.setItem(`WeatherDataukMetOffice_${suggestionText}`, JSON.stringify(data, new Date().toISOString())) - + + renderLatestData(lat, lon, suggestionText, refreshValue) }) } \ No newline at end of file diff --git a/app/src/main/assets/ui-files/ui.css b/app/src/main/assets/ui-files/ui.css index 2a338b7b..92052159 100644 --- a/app/src/main/assets/ui-files/ui.css +++ b/app/src/main/assets/ui-files/ui.css @@ -2771,3 +2771,13 @@ Tempmeterbaritem span{ .currentConditionItem { box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2); } + +.no_touch_screen{ + width: 100%; + z-index: 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999; + height: 100%; + background-color: transparent; + position: fixed; + left: 0; + top: 0; +} \ No newline at end of file diff --git a/app/src/main/java/com/example/weathermaster/MainActivity.java b/app/src/main/java/com/example/weathermaster/MainActivity.java index 3f0c439e..c353bc6d 100644 --- a/app/src/main/java/com/example/weathermaster/MainActivity.java +++ b/app/src/main/java/com/example/weathermaster/MainActivity.java @@ -210,9 +210,6 @@ public void onPageFinished(WebView view, String url) { // Trigger the refresh action webview.evaluateJavascript("refreshWeather();", null); - new Handler(Looper.getMainLooper()).postDelayed(() -> { - swipeRefreshLayout.setRefreshing(false); - }, 1000); new Handler(Looper.getMainLooper()).postDelayed(() -> { isPullToRefreshAllowed = true; @@ -284,6 +281,10 @@ private void disablePullToRefresh() { swipeRefreshLayout.setEnabled(false); } + private void stopRefreshLoader() { + swipeRefreshLayout.setRefreshing(false); + } + private void requestLocationPermissions() { if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) { @@ -473,6 +474,9 @@ public void run() { } else if (color.equals("EnableSwipeRefresh")) { enablePullToRefresh(); return; + } else if (color.equals("StopRefreshingLoader")) { + stopRefreshLoader(); + return; } else if (color.equals("bluesetDef")) { return; diff --git a/app/src/main/res/values-night-v31/colors.xml b/app/src/main/res/values-night-v31/colors.xml index 24ddd3da..3a3363d1 100644 --- a/app/src/main/res/values-night-v31/colors.xml +++ b/app/src/main/res/values-night-v31/colors.xml @@ -25,7 +25,7 @@ @android:color/system_neutral1_100 - @color/material_dynamic_neutral30 + @android:color/system_accent2_900 @color/black @color/material_dynamic_neutral40 diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml index eb4def14..6d74864d 100644 --- a/app/src/main/res/values-night/themes.xml +++ b/app/src/main/res/values-night/themes.xml @@ -24,5 +24,8 @@ @color/colorOnSurfaceVariant @color/colorSurfaceContainer + + @font/product_sans + @font/product_sans \ No newline at end of file diff --git a/app/src/main/res/values-v31/colors.xml b/app/src/main/res/values-v31/colors.xml index f41b04fe..0b4c390d 100644 --- a/app/src/main/res/values-v31/colors.xml +++ b/app/src/main/res/values-v31/colors.xml @@ -25,7 +25,7 @@ @android:color/system_neutral1_100 - @color/material_dynamic_neutral95 + @android:color/system_accent2_100 @color/white @color/material_dynamic_neutral90 diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 14b22942..4454ecc2 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -24,6 +24,9 @@ @color/colorOnSurfaceVariant @color/colorSurfaceContainer + + @font/product_sans + @font/product_sans