Apply suggestions from code review

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
This commit is contained in:
Roshan Varughese 2024-10-15 02:24:17 +13:00 committed by GitHub
parent 5af56fb51e
commit ac53e0e78c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 11 deletions

View File

@ -77,15 +77,8 @@ class BackupCreator(
throw IllegalStateException(context.stringResource(MR.strings.create_backup_file_error)) throw IllegalStateException(context.stringResource(MR.strings.create_backup_file_error))
} }
val backupManga = backupMangas( val nonFavoriteManga = if (options.readEntries) mangaRepository.getReadMangaNotInLibrary() else emptyList()
getFavorites.await() + val backupManga = backupMangas(getFavorites.await() + nonFavoriteManga , options)
if (options.readEntries) {
mangaRepository.getReadMangaNotInLibrary()
} else {
emptyList()
},
options,
)
val backup = Backup( val backup = Backup(
backupManga = backupManga, backupManga = backupManga,

View File

@ -30,8 +30,7 @@ data class BackupOptions(
privateSettings, privateSettings,
) )
fun canCreate() = fun canCreate() = libraryEntries || categories || appSettings || extensionRepoSettings || sourceSettings
libraryEntries || categories || readEntries || appSettings || extensionRepoSettings || sourceSettings
companion object { companion object {
val libraryOptions = persistentListOf( val libraryOptions = persistentListOf(