fix: update references to _conversationsCacheTimestamp provider
Generated provider name is _conversationsCacheTimestampProvider.
This commit is contained in:
@@ -721,7 +721,7 @@ final conversationsProvider = FutureProvider<List<Conversation>>((ref) async {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
// Check if we have a recent cache (within 5 seconds)
|
// Check if we have a recent cache (within 5 seconds)
|
||||||
final lastFetch = ref.read(_conversationsCacheTimestamp);
|
final lastFetch = ref.read(_conversationsCacheTimestampProvider);
|
||||||
if (lastFetch != null && DateTime.now().difference(lastFetch).inSeconds < 5) {
|
if (lastFetch != null && DateTime.now().difference(lastFetch).inSeconds < 5) {
|
||||||
DebugLogger.log(
|
DebugLogger.log(
|
||||||
'cache-hit',
|
'cache-hit',
|
||||||
@@ -929,7 +929,7 @@ final conversationsProvider = FutureProvider<List<Conversation>>((ref) async {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Update cache timestamp
|
// Update cache timestamp
|
||||||
ref.read(_conversationsCacheTimestamp.notifier).set(DateTime.now());
|
ref.read(_conversationsCacheTimestampProvider.notifier).set(DateTime.now());
|
||||||
|
|
||||||
return sortedConversations;
|
return sortedConversations;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -947,7 +947,7 @@ final conversationsProvider = FutureProvider<List<Conversation>>((ref) async {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Update cache timestamp
|
// Update cache timestamp
|
||||||
ref.read(_conversationsCacheTimestamp.notifier).set(DateTime.now());
|
ref.read(_conversationsCacheTimestampProvider.notifier).set(DateTime.now());
|
||||||
|
|
||||||
return conversations; // Return original conversations if folder fetch fails
|
return conversations; // Return original conversations if folder fetch fails
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user