From ad3fefac0b3a45c2c4fa7a3656fa1875df2f4135 Mon Sep 17 00:00:00 2001 From: zarzet Date: Sat, 7 Feb 2026 11:55:43 +0700 Subject: [PATCH] fix: skip tutorial for existing users upgrading to 3.5.0 Migration v2: auto-set hasCompletedTutorial=true when isFirstLaunch is already false (existing users who completed setup before tutorial feature was added) --- lib/providers/settings_provider.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/providers/settings_provider.dart b/lib/providers/settings_provider.dart index b00fb6df..3dd3ae8c 100644 --- a/lib/providers/settings_provider.dart +++ b/lib/providers/settings_provider.dart @@ -8,7 +8,7 @@ import 'package:spotiflac_android/utils/logger.dart'; const _settingsKey = 'app_settings'; const _migrationVersionKey = 'settings_migration_version'; -const _currentMigrationVersion = 1; +const _currentMigrationVersion = 2; const _spotifyClientSecretKey = 'spotify_client_secret'; class SettingsNotifier extends Notifier { @@ -51,7 +51,12 @@ class SettingsNotifier extends Notifier { if (state.downloadTreeUri.isNotEmpty && state.storageMode != 'saf') { state = state.copyWith(storageMode: 'saf'); } + // Migration 2: existing users who already completed setup should skip tutorial + if (!state.isFirstLaunch && !state.hasCompletedTutorial) { + state = state.copyWith(hasCompletedTutorial: true); + } await prefs.setInt(_migrationVersionKey, _currentMigrationVersion); + await _saveSettings(); } }