fixing splash screen
This commit is contained in:
@@ -12,9 +12,11 @@ class SplashProvider extends ChangeNotifier {
|
||||
|
||||
SplashCheckStatus _status = SplashCheckStatus.checking;
|
||||
Map<String, dynamic>? _updatePayload;
|
||||
bool _isRefreshing = false;
|
||||
|
||||
SplashCheckStatus get status => _status;
|
||||
Map<String, dynamic>? get updatePayload => _updatePayload;
|
||||
bool get isRefreshing => _isRefreshing;
|
||||
|
||||
/// The store / download URL from the server payload, or `null` if
|
||||
/// the server didn't include one.
|
||||
@@ -59,6 +61,9 @@ class SplashProvider extends ChangeNotifier {
|
||||
/// 3. Performs a hard refresh by reloading the current URL, which
|
||||
/// forces the browser to re-fetch all cached assets.
|
||||
Future<void> clearCacheAndRefresh() async {
|
||||
_isRefreshing = true;
|
||||
notifyListeners();
|
||||
|
||||
try {
|
||||
await _http.postRaw('/public/cache/cloudflare/clear');
|
||||
} catch (_) {
|
||||
|
||||
Reference in New Issue
Block a user