Clean up some companion object usages

This commit is contained in:
arkon
2021-09-05 14:34:29 -04:00
parent 02b430a5bf
commit ec4e631760
24 changed files with 87 additions and 138 deletions
@@ -33,13 +33,11 @@ class ExtensionTrustDialog<T>(bundle: Bundle? = null) : DialogController(bundle)
.create()
}
private companion object {
const val SIGNATURE_KEY = "signature_key"
const val PKGNAME_KEY = "pkgname_key"
}
interface Listener {
fun trustSignature(signatureHash: String)
fun uninstallExtension(pkgName: String)
}
}
private const val SIGNATURE_KEY = "signature_key"
private const val PKGNAME_KEY = "pkgname_key"
@@ -235,10 +235,7 @@ class ExtensionDetailsController(bundle: Bundle? = null) :
activity!!.theme.resolveAttribute(R.attr.preferenceTheme, tv, true)
return ContextThemeWrapper(activity, tv.resourceId)
}
private companion object {
const val PKGNAME_KEY = "pkg_name"
private const val URL_EXTENSION_COMMITS = "https://github.com/tachiyomiorg/tachiyomi-extensions/commits/master"
}
}
private const val PKGNAME_KEY = "pkg_name"
private const val URL_EXTENSION_COMMITS = "https://github.com/tachiyomiorg/tachiyomi-extensions/commits/master"
@@ -167,9 +167,7 @@ class SourcePreferencesController(bundle: Bundle? = null) :
// [key] isn't useful since there may be duplicates
return preferenceScreen!!.getPreference(lastOpenPreferencePosition!!) as T
}
private companion object {
const val SOURCE_ID = "source_id"
const val LASTOPENPREFERENCE_KEY = "last_open_preference"
}
}
private const val SOURCE_ID = "source_id"
private const val LASTOPENPREFERENCE_KEY = "last_open_preference"
@@ -37,8 +37,6 @@ class SourceSearchController(
override fun onItemLongClick(position: Int) {
view?.let { super.onItemClick(it, position) }
}
private companion object {
const val MANGA_KEY = "oldManga"
}
}
private const val MANGA_KEY = "oldManga"
@@ -74,8 +74,6 @@ class GlobalSearchAdapter(val controller: GlobalSearchController) :
interface OnTitleClickListener {
fun onTitleClick(source: CatalogueSource)
}
private companion object {
const val HOLDER_BUNDLE_KEY = "holder_bundle"
}
}
private const val HOLDER_BUNDLE_KEY = "holder_bundle"