mirror of
https://github.com/mihonapp/mihon.git
synced 2025-02-12 10:08:55 +01:00
Apply suggestions from code review
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
This commit is contained in:
parent
5af56fb51e
commit
ac53e0e78c
@ -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,
|
||||||
|
@ -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(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user