Merge pull request #4797 from pangeachat/4790-practice-mode-opens-a-grey-screen-overlay
fix: fix type issue with keys in practice selection repo
This commit is contained in:
commit
0c99ab3098
1 changed files with 6 additions and 4 deletions
|
|
@ -77,17 +77,19 @@ class PracticeSelectionRepo {
|
|||
static PracticeSelection? _getCached(
|
||||
String eventId,
|
||||
) {
|
||||
for (final String key in _storage.getKeys()) {
|
||||
try {
|
||||
try {
|
||||
final keys = List.from(_storage.getKeys());
|
||||
for (final String key in keys) {
|
||||
final cacheEntry = _PracticeSelectionCacheEntry.fromJson(
|
||||
_storage.read(key),
|
||||
);
|
||||
if (cacheEntry.isExpired) {
|
||||
_storage.remove(key);
|
||||
}
|
||||
} catch (e) {
|
||||
_storage.remove(key);
|
||||
}
|
||||
} catch (e) {
|
||||
_storage.erase();
|
||||
return null;
|
||||
}
|
||||
|
||||
final entry = _storage.read(eventId);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue