1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

General code cleanups

This commit is contained in:
bbedward
2025-08-02 16:18:12 -04:00
parent 2cf7497324
commit 599118c63e
68 changed files with 102 additions and 1241 deletions

View File

@@ -100,7 +100,7 @@ Singleton {
function addRef() {
refCount++;
console.log("WeatherService: addRef, refCount now:", refCount);
if (refCount === 1 && !weather.available) {
// Start fetching when first consumer appears
fetchWeather();
@@ -109,13 +109,13 @@ Singleton {
function removeRef() {
refCount = Math.max(0, refCount - 1);
console.log("WeatherService: removeRef, refCount now:", refCount);
}
function fetchWeather() {
// Only fetch if someone is consuming the data
if (root.refCount === 0) {
console.log("WeatherService: Skipping fetch - no consumers");
return;
}