offline options globally toggleable

This commit is contained in:
stopflock committed 2026-07-25 20:40:15 -05:00
1 parent 6f017fd6c1
commit dfcc64e96e
24 files changed
+489 -92

No files matched your search

+5
View File
@@ -390,8 +390,13 @@ class NodeDataManager extends ChangeNotifier {
/// Load all offline nodes into cache (call at app startup)
Future<void> preloadOfflineNodes() async {
// Skip entirely when the user has disabled offline features — this call
// isn't gated by OfflineAreaService.hasOfflineAreasForProvider*() since
// it fetches directly via fetchLocalNodes, so we guard it explicitly.
if (!AppState.instance.offlineFeaturesEnabled) return;
try {
final offlineAreaService = OfflineAreaService();
for (final area in offlineAreaService.offlineAreas) {
if (area.status != OfflineAreaStatus.complete) continue;