Fix bug where widget would get out of sync w/ app once collected artifacts were explored
This commit is contained in:
parent
97cb83733c
commit
590e542b34
@ -57,10 +57,11 @@ class CollectiblesLogic with ThrottledSaveLoadMixin {
|
|||||||
if (state == CollectibleState.discovered) _discoveredCount++;
|
if (state == CollectibleState.discovered) _discoveredCount++;
|
||||||
if (state == CollectibleState.explored) _exploredCount++;
|
if (state == CollectibleState.explored) _exploredCount++;
|
||||||
});
|
});
|
||||||
HomeWidget.saveWidgetData<int>('discoveredCount', _discoveredCount).then((value){
|
final foundCount = discoveredCount + exploredCount;
|
||||||
|
HomeWidget.saveWidgetData<int>('discoveredCount', foundCount).then((value) {
|
||||||
HomeWidget.updateWidget(iOSName: _appName);
|
HomeWidget.updateWidget(iOSName: _appName);
|
||||||
});
|
});
|
||||||
debugPrint('setting discovered count for home widget $_discoveredCount');
|
debugPrint('setting discoveredCount for home widget $foundCount');
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get a discovered item, sorted by the order of wondersLogic.all
|
/// Get a discovered item, sorted by the order of wondersLogic.all
|
||||||
|
Loading…
x
Reference in New Issue
Block a user