mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
added Kdoc
This commit is contained in:
parent
5269327f40
commit
b81fb11ceb
1 changed files with 12 additions and 0 deletions
|
|
@ -131,10 +131,22 @@ class UploadPresenter @Inject internal constructor(
|
|||
basicKvStoreFactory = factory
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current BasicKvStore factory or throws if not initialized.
|
||||
*
|
||||
* @throws IllegalStateException if basicKvStoreFactory has not been initialized.
|
||||
*/
|
||||
|
||||
private fun getBasicKvStoreFactory(): (String) -> BasicKvStore {
|
||||
return basicKvStoreFactory ?: throw IllegalStateException("basicKvStoreFactory has not been initialized")
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that the BasicKvStore factory has been initialized before use.
|
||||
*
|
||||
* @throws IllegalStateException if the factory is null.
|
||||
*/
|
||||
|
||||
private fun requireFactoryInitialized() {
|
||||
val field = this::class.java.getDeclaredField("basicKvStoreFactory")
|
||||
field.isAccessible = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue