fix: Do not delete cached downloads

This commit is contained in:
oSumAtrIX 2023-10-01 04:48:24 +02:00
parent 6e26130744
commit 6961bb7fd0
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
3 changed files with 1 additions and 7 deletions

View File

@ -38,7 +38,6 @@ class GithubAPI {
Future<void> clearAllCache() async {
try {
await _cacheOptions.store!.clean();
await DefaultCacheManager().emptyCache();
} on Exception catch (e) {
if (kDebugMode) {
print(e);

View File

@ -41,7 +41,6 @@ class RevancedAPI {
Future<void> clearAllCache() async {
try {
await _cacheOptions.store!.clean();
await DefaultCacheManager().emptyCache();
} on Exception catch (e) {
if (kDebugMode) {
print(e);

View File

@ -464,11 +464,7 @@ class HomeViewModel extends BaseViewModel {
}
Future<void> forceRefresh(BuildContext context) async {
await Future.delayed(const Duration(seconds: 1));
if (_lastUpdate == null ||
_lastUpdate!.difference(DateTime.now()).inSeconds > 2) {
_managerAPI.clearAllData();
}
_managerAPI.clearAllData();
_toast.showBottom('homeView.refreshSuccess');
initialize(context);
}