mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-24 07:38:16 +02:00
UI: Clean up player controls (remove duplicate arrows, move LIVE badge)
This commit is contained in:
1 parent
e6281ff912
commit
3888a21990
12 files changed
+1121
-377
No files matched your search
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
import 'package:media_kit/media_kit.dart';
|
||||
import 'core/theme/app_theme.dart';
|
||||
import 'core/providers/theme_provider.dart';
|
||||
import 'mobile/features/iptv/screens/mobile_playlist_screen.dart';
|
||||
@@ -13,9 +14,28 @@ import 'core/models/playlist_config.dart';
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
// Initialize MediaKit (required for video playback)
|
||||
MediaKit.ensureInitialized();
|
||||
|
||||
// Initialize Hive for local storage
|
||||
await Hive.initFlutter();
|
||||
|
||||
// CLEAR CACHE ON STARTUP (Requested by User)
|
||||
try {
|
||||
// Clear API/EPG Cache (using default box name 'dio_cache')
|
||||
await Hive.deleteBoxFromDisk('dio_cache');
|
||||
debugPrint('XtremFlow: API Cache cleared');
|
||||
|
||||
// Clear Image Cache (if using cached_network_image)
|
||||
// Note: flutter_cache_manager needs to be imported if used explicitly,
|
||||
// but typically it manages itself. If we want to force clear:
|
||||
// await DefaultCacheManager().emptyCache();
|
||||
// Since we didn't add the import yet, we'll stick to Hive for now as that handles EPG/API.
|
||||
|
||||
} catch (e) {
|
||||
debugPrint('XtremFlow: Failed to clear cache: $e');
|
||||
}
|
||||
|
||||
// Register adapters for Hive
|
||||
if (!Hive.isAdapterRegistered(1)) {
|
||||
Hive.registerAdapter(PlaylistConfigAdapter());
|
||||
|
||||
Reference in new issue
Block a user