mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
Merge pull request #2173 from nextcloud/chore/noid/basecontroller-injected-nullability
NewBaseController: Inject kotlin fields without @JvmField and nullable type
This commit is contained in:
commit
cbd7e89828
@ -68,12 +68,10 @@ abstract class NewBaseController(@LayoutRes var layoutRes: Int, args: Bundle? =
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@JvmField
|
lateinit var appPreferences: AppPreferences
|
||||||
var appPreferences: AppPreferences? = null
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@JvmField
|
lateinit var context: Context
|
||||||
var context: Context? = null
|
|
||||||
|
|
||||||
protected open val title: String?
|
protected open val title: String?
|
||||||
get() = null
|
get() = null
|
||||||
@ -93,6 +91,8 @@ abstract class NewBaseController(@LayoutRes var layoutRes: Int, args: Bundle? =
|
|||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
@Suppress("LeakingThis")
|
||||||
|
sharedApplication!!.componentApplication.inject(this)
|
||||||
addLifecycleListener(object : LifecycleListener() {
|
addLifecycleListener(object : LifecycleListener() {
|
||||||
override fun postCreateView(controller: Controller, view: View) {
|
override fun postCreateView(controller: Controller, view: View) {
|
||||||
onViewBound(view)
|
onViewBound(view)
|
||||||
@ -271,7 +271,6 @@ abstract class NewBaseController(@LayoutRes var layoutRes: Int, args: Bundle? =
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun cleanTempCertPreference() {
|
private fun cleanTempCertPreference() {
|
||||||
sharedApplication!!.componentApplication.inject(this)
|
|
||||||
val temporaryClassNames: MutableList<String> = ArrayList()
|
val temporaryClassNames: MutableList<String> = ArrayList()
|
||||||
temporaryClassNames.add(ServerSelectionController::class.java.name)
|
temporaryClassNames.add(ServerSelectionController::class.java.name)
|
||||||
temporaryClassNames.add(AccountVerificationController::class.java.name)
|
temporaryClassNames.add(AccountVerificationController::class.java.name)
|
||||||
|
Loading…
Reference in New Issue
Block a user