mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 02:34:39 +00:00
fix(backup): Allow creating backup without entries
This commit is contained in:
parent
19e87040f6
commit
24784d6e78
1 changed files with 1 additions and 6 deletions
|
@ -7,7 +7,6 @@ import eu.kanade.tachiyomi.source.SourceManager
|
|||
import eu.kanade.tachiyomi.util.BackupUtil
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
import yokai.i18n.MR
|
||||
import yokai.util.lang.getString
|
||||
|
||||
class BackupFileValidator(
|
||||
|
@ -28,11 +27,7 @@ class BackupFileValidator(
|
|||
throw IllegalStateException(e)
|
||||
}
|
||||
|
||||
if (backup.backupManga.isEmpty()) {
|
||||
throw IllegalStateException(context.getString(MR.strings.backup_has_no_manga))
|
||||
}
|
||||
|
||||
val sources = backup.backupSources.map { it.sourceId to it.name }.toMap()
|
||||
val sources = backup.backupSources.associate { it.sourceId to it.name }
|
||||
val missingSources = sources
|
||||
.filter { sourceManager.get(it.key) == null }
|
||||
.map { sourceManager.getOrStub(it.key).name }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue