mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
fix: Do not delete cached downloads
This commit is contained in:
parent
6e26130744
commit
6961bb7fd0
@ -38,7 +38,6 @@ class GithubAPI {
|
|||||||
Future<void> clearAllCache() async {
|
Future<void> clearAllCache() async {
|
||||||
try {
|
try {
|
||||||
await _cacheOptions.store!.clean();
|
await _cacheOptions.store!.clean();
|
||||||
await DefaultCacheManager().emptyCache();
|
|
||||||
} on Exception catch (e) {
|
} on Exception catch (e) {
|
||||||
if (kDebugMode) {
|
if (kDebugMode) {
|
||||||
print(e);
|
print(e);
|
||||||
|
@ -41,7 +41,6 @@ class RevancedAPI {
|
|||||||
Future<void> clearAllCache() async {
|
Future<void> clearAllCache() async {
|
||||||
try {
|
try {
|
||||||
await _cacheOptions.store!.clean();
|
await _cacheOptions.store!.clean();
|
||||||
await DefaultCacheManager().emptyCache();
|
|
||||||
} on Exception catch (e) {
|
} on Exception catch (e) {
|
||||||
if (kDebugMode) {
|
if (kDebugMode) {
|
||||||
print(e);
|
print(e);
|
||||||
|
@ -464,11 +464,7 @@ class HomeViewModel extends BaseViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> forceRefresh(BuildContext context) async {
|
Future<void> forceRefresh(BuildContext context) async {
|
||||||
await Future.delayed(const Duration(seconds: 1));
|
_managerAPI.clearAllData();
|
||||||
if (_lastUpdate == null ||
|
|
||||||
_lastUpdate!.difference(DateTime.now()).inSeconds > 2) {
|
|
||||||
_managerAPI.clearAllData();
|
|
||||||
}
|
|
||||||
_toast.showBottom('homeView.refreshSuccess');
|
_toast.showBottom('homeView.refreshSuccess');
|
||||||
initialize(context);
|
initialize(context);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user