feat(iptv): introduce settings provider and tab for managing IPTV preferences

This commit is contained in:
Michael committed 2025-12-08 22:23:36 +01:00
1 parent e5af0ec044
commit 7d13132fcd
3 files changed
+16 -1

No files matched your search

@@ -236,6 +236,16 @@ class IptvSettingsNotifier extends StateNotifier<IptvSettings> {
IptvSettingsNotifier(this._ref) : super(const IptvSettings()) {
_loadSettings();
_setupAuthListener();
}
void _setupAuthListener() {
_ref.listen<AuthState>(authProvider, (previous, next) {
if (previous?.isAuthenticated == false && next.isAuthenticated) {
// User just logged in, sync settings from API
_fetchFromApi();
}
});
}
/// Load settings from SharedPreferences and then API