|
|
@ -18,7 +18,7 @@ import java.io.File |
|
|
|
class ImportBookSourceViewModel(app: Application) : BaseViewModel(app) { |
|
|
|
class ImportBookSourceViewModel(app: Application) : BaseViewModel(app) { |
|
|
|
|
|
|
|
|
|
|
|
val errorLiveData = MutableLiveData<String>() |
|
|
|
val errorLiveData = MutableLiveData<String>() |
|
|
|
val successLiveData = MutableLiveData<Boolean>() |
|
|
|
val successLiveData = MutableLiveData<Int>() |
|
|
|
|
|
|
|
|
|
|
|
val allSources = arrayListOf<BookSource>() |
|
|
|
val allSources = arrayListOf<BookSource>() |
|
|
|
val sourceCheckState = arrayListOf<Boolean>() |
|
|
|
val sourceCheckState = arrayListOf<Boolean>() |
|
|
@ -110,7 +110,7 @@ class ImportBookSourceViewModel(app: Application) : BaseViewModel(app) { |
|
|
|
sourceCheckState.add(has) |
|
|
|
sourceCheckState.add(has) |
|
|
|
selectStatus.add(!has) |
|
|
|
selectStatus.add(!has) |
|
|
|
} |
|
|
|
} |
|
|
|
successLiveData.postValue(true) |
|
|
|
successLiveData.postValue(allSources.size) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|