Clear the cache of upload URLs once the user logs out
This commit is contained in:
parent
661b1ceb0e
commit
e51cf98e09
2 changed files with 6 additions and 0 deletions
|
@ -30,6 +30,7 @@ import 'package:photos/services/memories_service.dart';
|
|||
import 'package:photos/services/search_service.dart';
|
||||
import 'package:photos/services/sync_service.dart';
|
||||
import 'package:photos/utils/crypto_util.dart';
|
||||
import 'package:photos/utils/file_uploader.dart';
|
||||
import 'package:photos/utils/validator_util.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
@ -162,6 +163,7 @@ class Configuration {
|
|||
await UploadLocksDB.instance.clearTable();
|
||||
await IgnoredFilesService.instance.reset();
|
||||
await TrashDB.instance.clearTable();
|
||||
FileUploader.instance.clearCachedUploadURLs();
|
||||
if (!autoLogout) {
|
||||
CollectionsService.instance.clearCache();
|
||||
FavoritesService.instance.clearCache();
|
||||
|
|
|
@ -176,6 +176,10 @@ class FileUploader {
|
|||
_totalCountInUploadSession = 0;
|
||||
}
|
||||
|
||||
void clearCachedUploadURLs() {
|
||||
_uploadURLs.clear();
|
||||
}
|
||||
|
||||
void removeFromQueueWhere(final bool Function(File) fn, final Error reason) {
|
||||
final List<String> uploadsToBeRemoved = [];
|
||||
_queue.entries
|
||||
|
|
Loading…
Add table
Reference in a new issue