mirror of
https://github.com/zapstore/zapstore.git
synced 2026-10-05 20:48:24 +00:00
Always mark receipts as loaded after first attempt, update purplebase for sender fallback fix
This commit is contained in:
@@ -175,19 +175,20 @@ class ZapReceiptsNotifier extends StateNotifier<AsyncValue<Set<ZapReceipt>>> {
|
||||
data.map((r) => ZapReceipt.fromJson(r.toJson()).init().saveLocal());
|
||||
await _loadZappers(zapReceipts);
|
||||
|
||||
// Mark loading done for this event
|
||||
ref
|
||||
.read(_zapsPreviouslyLoadedProvider(fileMetadata.event.id).notifier)
|
||||
.state = true;
|
||||
|
||||
state = AsyncData({if (state.hasValue) ...state.value!, ...zapReceipts});
|
||||
});
|
||||
|
||||
// If after 10 seconds we receive no zaps, then change the state to empty
|
||||
// (to prevent forever spinners)
|
||||
Timer(Duration(seconds: 10), () {
|
||||
if (mounted && state is AsyncLoading) {
|
||||
state = AsyncData({});
|
||||
// If after 8 seconds we receive no zaps, then change the state to empty
|
||||
// (to prevent forever spinners) and set to loading attempted
|
||||
Timer(Duration(seconds: 8), () {
|
||||
if (mounted) {
|
||||
// Mark loading done for this event
|
||||
ref
|
||||
.read(_zapsPreviouslyLoadedProvider(fileMetadata.event.id).notifier)
|
||||
.state = true;
|
||||
if (state is AsyncLoading) {
|
||||
state = AsyncData({});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+2
-2
@@ -1018,8 +1018,8 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "."
|
||||
ref: f45591e45abea0d4b39ad8aa2c54ee2c7e2c6b90
|
||||
resolved-ref: f45591e45abea0d4b39ad8aa2c54ee2c7e2c6b90
|
||||
ref: "6e7c86bc98a8a08b67b8fe8f70d3fcbd58d6476c"
|
||||
resolved-ref: "6e7c86bc98a8a08b67b8fe8f70d3fcbd58d6476c"
|
||||
url: "https://github.com/purplebase/purplebase"
|
||||
source: git
|
||||
version: "0.2.0"
|
||||
|
||||
+2
-2
@@ -57,10 +57,10 @@ dependencies:
|
||||
|
||||
dependency_overrides:
|
||||
purplebase:
|
||||
# path: ../purplebase
|
||||
# path: ../../purplebase/purplebase
|
||||
git:
|
||||
url: https://github.com/purplebase/purplebase
|
||||
ref: f45591e45abea0d4b39ad8aa2c54ee2c7e2c6b90
|
||||
ref: 6e7c86bc98a8a08b67b8fe8f70d3fcbd58d6476c
|
||||
flutter_data:
|
||||
git:
|
||||
url: https://github.com/zapstore/flutter_data
|
||||
|
||||
Reference in New Issue
Block a user