Address minor Kotlin compiler warnings

This commit is contained in:
Eugene
2019-12-26 17:48:39 -05:00
parent c349fb0e37
commit c339bd49d0
16 changed files with 29 additions and 30 deletions
@@ -47,7 +47,7 @@ class ExtensionDetailsController(bundle: Bundle? = null) :
}
override fun createPresenter(): ExtensionDetailsPresenter {
return ExtensionDetailsPresenter(args.getString(PKGNAME_KEY))
return ExtensionDetailsPresenter(args.getString(PKGNAME_KEY)!!)
}
override fun getTitle(): String? {
@@ -119,7 +119,7 @@ class ExtensionDetailsController(bundle: Bundle? = null) :
private fun addPreferencesForSource(screen: PreferenceScreen, source: Source, multiSource: Boolean) {
val context = screen.context
// TODO
// TODO
val dataStore = SharedPreferencesDataStore(/*if (source is HttpSource) {
source.preferences
} else {*/
@@ -13,7 +13,7 @@ class ExtensionDividerItemDecoration(context: Context) : RecyclerView.ItemDecora
init {
val a = context.obtainStyledAttributes(intArrayOf(android.R.attr.listDivider))
divider = a.getDrawable(0)
divider = a.getDrawable(0)!!
a.recycle()
}
@@ -24,10 +24,10 @@ class ExtensionTrustDialog<T>(bundle: Bundle? = null) : DialogController(bundle)
.positiveText(R.string.ext_trust)
.negativeText(R.string.ext_uninstall)
.onPositive { _, _ ->
(targetController as? Listener)?.trustSignature(args.getString(SIGNATURE_KEY))
(targetController as? Listener)?.trustSignature(args.getString(SIGNATURE_KEY)!!)
}
.onNegative { _, _ ->
(targetController as? Listener)?.uninstallExtension(args.getString(PKGNAME_KEY))
(targetController as? Listener)?.uninstallExtension(args.getString(PKGNAME_KEY)!!)
}
.build()
}