File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,15 +81,22 @@ Future<void> migrateNovelData() async {
8181 'novel_data_migration_complete_v2' ,
8282 defaultValue: false ,
8383 );
84+ final fixApplied = prefs.getBool (
85+ 'novel_data_migration_fix_applied' ,
86+ defaultValue: false ,
87+ );
8488 final hasBackup = prefs.getString ('bookmarked_novels_backup' ).isNotEmpty;
8589
86- // If migration was done but we still have backup, fix the migration
87- if (migrationComplete && hasBackup) {
90+ // If migration was done but fix not applied yet, and we still have backup
91+ if (migrationComplete && ! fixApplied && hasBackup) {
8892 debugPrint ('🔧 Detected previous migration with URL issues, fixing...' );
8993
9094 final fixSuccess = await migrationService.fixMigration ();
9195
9296 if (fixSuccess) {
97+ // Mark fix as applied so it doesn't run again
98+ await prefs.setBool ('novel_data_migration_fix_applied' , true );
99+
93100 debugPrint ('✅ Migration fix successful!' );
94101
95102 // Show stats
You can’t perform that action at this time.
0 commit comments