mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-11 17:29:26 +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
@@ -8,12 +8,14 @@ class MobileSettings {
|
||||
final List<String> moviesKeywords;
|
||||
final List<String> seriesKeywords;
|
||||
final bool showClock;
|
||||
final int bufferDuration; // seconds, 0 = auto
|
||||
|
||||
const MobileSettings({
|
||||
this.liveTvKeywords = const [],
|
||||
this.moviesKeywords = const [],
|
||||
this.seriesKeywords = const [],
|
||||
this.showClock = false,
|
||||
this.bufferDuration = 0,
|
||||
});
|
||||
|
||||
MobileSettings copyWith({
|
||||
@@ -21,12 +23,14 @@ class MobileSettings {
|
||||
List<String>? moviesKeywords,
|
||||
List<String>? seriesKeywords,
|
||||
bool? showClock,
|
||||
int? bufferDuration,
|
||||
}) {
|
||||
return MobileSettings(
|
||||
liveTvKeywords: liveTvKeywords ?? this.liveTvKeywords,
|
||||
moviesKeywords: moviesKeywords ?? this.moviesKeywords,
|
||||
seriesKeywords: seriesKeywords ?? this.seriesKeywords,
|
||||
showClock: showClock ?? this.showClock,
|
||||
bufferDuration: bufferDuration ?? this.bufferDuration,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -73,12 +77,14 @@ class MobileSettingsNotifier extends StateNotifier<MobileSettings> {
|
||||
final movies = _box?.get('moviesKeywords', defaultValue: <String>[]) as List?;
|
||||
final series = _box?.get('seriesKeywords', defaultValue: <String>[]) as List?;
|
||||
final showClock = _box?.get('showClock', defaultValue: false) as bool?;
|
||||
final buffer = _box?.get('bufferDuration', defaultValue: 0) as int?;
|
||||
|
||||
state = MobileSettings(
|
||||
liveTvKeywords: liveTv?.cast<String>() ?? [],
|
||||
moviesKeywords: movies?.cast<String>() ?? [],
|
||||
seriesKeywords: series?.cast<String>() ?? [],
|
||||
showClock: showClock ?? false,
|
||||
bufferDuration: buffer ?? 0,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -101,6 +107,11 @@ class MobileSettingsNotifier extends StateNotifier<MobileSettings> {
|
||||
state = state.copyWith(showClock: value);
|
||||
_box?.put('showClock', value);
|
||||
}
|
||||
|
||||
void setBufferDuration(int seconds) {
|
||||
state = state.copyWith(bufferDuration: seconds);
|
||||
_box?.put('bufferDuration', seconds);
|
||||
}
|
||||
}
|
||||
|
||||
final mobileSettingsProvider = StateNotifierProvider<MobileSettingsNotifier, MobileSettings>((ref) {
|
||||
|
||||
Reference in new issue
Block a user