mirror of
https://github.com/zapstore/zapstore.git
synced 2026-10-05 20:48:24 +00:00
Updates fixes
This commit is contained in:
+2
-4
@@ -218,15 +218,13 @@ mixin AppAdapter on Adapter<App> {
|
||||
return super.findAll(params: params);
|
||||
}
|
||||
|
||||
Future<List<App>> checkForUpdates() async {
|
||||
Future<void> checkForUpdates() async {
|
||||
final appIds = await _installedIdentifiers();
|
||||
if (appIds.isNotEmpty) {
|
||||
final apps = await fetchAppModels({'#d': appIds});
|
||||
await fetchAppModels({'#d': appIds});
|
||||
// Once apps are loaded, check for installed status
|
||||
await ref.localApps.localAppAdapter.refreshUpdateStatus();
|
||||
return apps;
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
Future<List<App>> fetchAppModels(Map<String, dynamic> params) async {
|
||||
|
||||
@@ -38,6 +38,8 @@ final appInitializer = FutureProvider<void>((ref) async {
|
||||
// Do not use ignoreReturn here
|
||||
if (ref.appCurationSets.countLocal == 0) {
|
||||
await ref.appCurationSets.findAll();
|
||||
// Take opportunity to preload updates
|
||||
await ref.apps.appAdapter.checkForUpdates();
|
||||
} else {
|
||||
ref.appCurationSets.findAll();
|
||||
}
|
||||
@@ -45,8 +47,6 @@ final appInitializer = FutureProvider<void>((ref) async {
|
||||
// Preload zapstore's nostr curation set
|
||||
await ref.read(appCurationSetProvider(kNostrCurationSet).notifier).fetch();
|
||||
|
||||
ref.localApps.localAppAdapter.updateNumberOfApps();
|
||||
|
||||
// Handle deep links
|
||||
final appLinksSub = appLinks.uriLinkStream.listen((uri) async {
|
||||
if (uri.scheme == "zapstore") {
|
||||
|
||||
@@ -4,7 +4,6 @@ import 'package:gap/gap.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:zapstore/main.data.dart';
|
||||
import 'package:zapstore/models/app.dart';
|
||||
import 'package:zapstore/models/local_app.dart';
|
||||
import 'package:zapstore/widgets/app_card.dart';
|
||||
import 'package:zapstore/widgets/spinning_logo.dart';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user