Download tab

This commit is contained in:
tom5079
2021-06-25 14:45:10 +09:00
parent 975b98e4dc
commit 2a92d287af
10 changed files with 123 additions and 59 deletions

View File

@@ -136,12 +136,12 @@ abstract class Source<Query_SortMode: Enum<Query_SortMode>, Suggestion: SearchSu
typealias SourceEntry = Pair<String, AnySource>
typealias SourceEntries = Set<SourceEntry>
typealias PreferenceID = Pair<String, Int>
typealias PreferenceIDs = Set<PreferenceID>
typealias SourcePreferenceID = Pair<String, Int>
typealias SourcePreferenceIDs = Set<SourcePreferenceID>
@Suppress("UNCHECKED_CAST")
val sourceModule = DI.Module(name = "source") {
bindSet<SourceEntry>()
bindSet<PreferenceID>()
bindSet<SourcePreferenceID>()
listOf(
Hitomi()
@@ -151,5 +151,5 @@ val sourceModule = DI.Module(name = "source") {
}
bind { factory { source: String -> History(di, source) } }
bind { singleton { Downloads(di) } }
inSet { singleton { Downloads(di).let { it.name to (it as AnySource) } } }
}