fixing splash screen

This commit is contained in:
Prince
2026-06-21 20:27:45 +02:00
parent 101486cb1e
commit eca22cd6a3
2 changed files with 73 additions and 27 deletions

View File

@@ -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 (_) {