mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 14:27:57 +01:00 
			
		
		
		
	Add specific support for dummy extensions so that read chapter history is able to be freely restored without connecting to the source
This commit is contained in:
		| @@ -303,7 +303,16 @@ class BackupManager(val context: Context, version: Int = CURRENT_VERSION) { | ||||
|             } else { | ||||
|                 source.fetchChapterList(manga) | ||||
|             } | ||||
|             ).map { syncChaptersWithSource(databaseHelper, it, manga, source) } | ||||
|             ).map { | ||||
|             if (it.last().chapter_number == -99F) { | ||||
|                 chapters.forEach { chapter -> | ||||
|                     chapter.name = "Chapter ${chapter.chapter_number} restored by dummy source" | ||||
|                 } | ||||
|                 syncChaptersWithSource(databaseHelper, chapters, manga, source) | ||||
|             } else { | ||||
|                 syncChaptersWithSource(databaseHelper, it, manga, source) | ||||
|             } | ||||
|         } | ||||
|             .doOnNext { pair -> | ||||
|                 if (pair.first.isNotEmpty()) { | ||||
|                     chapters.forEach { it.manga_id = manga.id } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user