|
@@ -63,7 +63,7 @@ import javax.inject.Inject
|
|
|
import kotlin.jvm.internal.Intrinsics
|
|
|
|
|
|
@AutoInjector(NextcloudTalkApplication::class)
|
|
|
-abstract class NewBaseController(@LayoutRes var layoutRes: Int, args: Bundle? = null) : Controller(args) {
|
|
|
+abstract class BaseController(@LayoutRes var layoutRes: Int, args: Bundle? = null) : Controller(args) {
|
|
|
enum class AppBarLayoutType {
|
|
|
TOOLBAR, SEARCH_BAR, EMPTY
|
|
|
}
|
|
@@ -235,7 +235,7 @@ abstract class NewBaseController(@LayoutRes var layoutRes: Int, args: Bundle? =
|
|
|
|
|
|
override fun onDetach(view: View) {
|
|
|
super.onDetach(view)
|
|
|
- val imm = context!!.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
|
|
+ val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
|
|
imm.hideSoftInputFromWindow(view.windowToken, 0)
|
|
|
}
|
|
|
|
|
@@ -285,7 +285,7 @@ abstract class NewBaseController(@LayoutRes var layoutRes: Int, args: Bundle? =
|
|
|
temporaryClassNames.add(WebViewLoginController::class.java.name)
|
|
|
temporaryClassNames.add(SwitchAccountController::class.java.name)
|
|
|
if (!temporaryClassNames.contains(javaClass.name)) {
|
|
|
- appPreferences!!.removeTemporaryClientCertAlias()
|
|
|
+ appPreferences.removeTemporaryClientCertAlias()
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -328,9 +328,9 @@ abstract class NewBaseController(@LayoutRes var layoutRes: Int, args: Bundle? =
|
|
|
open val appBarLayoutType: AppBarLayoutType
|
|
|
get() = AppBarLayoutType.TOOLBAR
|
|
|
val searchHint: String
|
|
|
- get() = context!!.getString(R.string.appbar_search_in, context!!.getString(R.string.nc_app_product_name))
|
|
|
+ get() = context.getString(R.string.appbar_search_in, context.getString(R.string.nc_app_product_name))
|
|
|
|
|
|
companion object {
|
|
|
- private val TAG = NewBaseController::class.java.simpleName
|
|
|
+ private val TAG = BaseController::class.java.simpleName
|
|
|
}
|
|
|
}
|