mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2025-05-12 13:35:37 +02:00
fix: Do not delete cached downloads
This commit is contained in:
parent
6e26130744
commit
6961bb7fd0
3 changed files with 1 additions and 7 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
_toast.showBottom('homeView.refreshSuccess');
|
||||
initialize(context);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue