mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-24 07:38:16 +02:00
Fix: Movie infinite scroll + Player controls auto-hide
- Added in-memory caching for movies/series pagination in XtreamServiceMobile - Fixed player controls appearing then instantly disappearing on touch - Updated refresh methods to clear cache on pull-to-refresh - Added releases/ to gitignore (APKs too large for GitHub)
This commit is contained in:
1 parent
3888a21990
commit
ccda497236
8 files changed
+330
-83
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'dart:io';
|
||||
import '../../../providers/mobile_xtream_providers.dart';
|
||||
import '../../../providers/mobile_settings_providers.dart';
|
||||
@@ -19,7 +20,7 @@ class MobileLiveTVTab extends ConsumerStatefulWidget {
|
||||
ConsumerState<MobileLiveTVTab> createState() => _MobileLiveTVTabState();
|
||||
}
|
||||
|
||||
class _MobileLiveTVTabState extends ConsumerState<MobileLiveTVTab> {
|
||||
class _MobileLiveTVTabState extends ConsumerState<MobileLiveTVTab> with AutomaticKeepAliveClientMixin {
|
||||
String? _selectedCategory;
|
||||
final TextEditingController _searchController = TextEditingController();
|
||||
String _searchQuery = '';
|
||||
@@ -43,8 +44,12 @@ class _MobileLiveTVTabState extends ConsumerState<MobileLiveTVTab> {
|
||||
|
||||
bool _isCategoryView = true;
|
||||
|
||||
@override
|
||||
bool get wantKeepAlive => true;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
super.build(context);
|
||||
final channelsAsync = ref.watch(mobileLiveChannelsProvider(widget.playlist));
|
||||
final favorites = ref.watch(mobileFavoritesProvider);
|
||||
final settings = ref.watch(mobileSettingsProvider);
|
||||
@@ -214,7 +219,7 @@ class _MobileLiveTVTabState extends ConsumerState<MobileLiveTVTab> {
|
||||
return GridView.builder(
|
||||
padding: const EdgeInsets.all(16),
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 8, // Drastically reduced size as requested
|
||||
crossAxisCount: 6, // Adjusted to 6 columns as requested
|
||||
childAspectRatio: 1.0,
|
||||
crossAxisSpacing: 8,
|
||||
mainAxisSpacing: 8,
|
||||
@@ -386,10 +391,11 @@ class _MobileChannelTileState extends ConsumerState<_MobileChannelTile> {
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: iconUrl != null
|
||||
? Image.network(
|
||||
iconUrl,
|
||||
? CachedNetworkImage(
|
||||
imageUrl: iconUrl,
|
||||
fit: BoxFit.contain,
|
||||
errorBuilder: (_, __, ___) => const Icon(Icons.tv, color: Colors.white24),
|
||||
errorWidget: (_, __, ___) => const Icon(Icons.tv, color: Colors.white24),
|
||||
placeholder: (_, __) => const Icon(Icons.tv, color: Colors.white24),
|
||||
)
|
||||
: const Icon(Icons.tv, color: Colors.white24),
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user