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))
|
||||
}
|
||||
|
||||
val backupManga = backupMangas(
|
||||
getFavorites.await() +
|
||||
if (options.readEntries) {
|
||||
mangaRepository.getReadMangaNotInLibrary()
|
||||
} else {
|
||||
emptyList()
|
||||
},
|
||||
options,
|
||||
)
|
||||
val nonFavoriteManga = if (options.readEntries) mangaRepository.getReadMangaNotInLibrary() else emptyList()
|
||||
val backupManga = backupMangas(getFavorites.await() + nonFavoriteManga , options)
|
||||
|
||||
val backup = Backup(
|
||||
backupManga = backupManga,
|
||||
|
@ -30,8 +30,7 @@ data class BackupOptions(
|
||||
privateSettings,
|
||||
)
|
||||
|
||||
fun canCreate() =
|
||||
libraryEntries || categories || readEntries || appSettings || extensionRepoSettings || sourceSettings
|
||||
fun canCreate() = libraryEntries || categories || appSettings || extensionRepoSettings || sourceSettings
|
||||
|
||||
companion object {
|
||||
val libraryOptions = persistentListOf(
|
||||
|
Loading…
x
Reference in New Issue
Block a user