Commit 5fed95f9 authored by Max Lv's avatar Max Lv

Make lint happy

parent 1ff8174e
......@@ -47,6 +47,10 @@ android {
}
ndkVersion rootProject.ndkVersion
lintOptions {
disable 'InvalidPackage'
}
}
androidExtensions {
......
......@@ -55,6 +55,9 @@ android {
sourceSets.main.jniLibs.srcDirs +=
new File(project(':core').buildDir, "intermediates/bundles/${getCurrentFlavor()}/jni")
ndkVersion rootProject.ndkVersion
lintOptions {
disable 'InvalidPackage'
}
}
androidExtensions {
......
......@@ -177,7 +177,7 @@ class ProfileConfigFragment : PreferenceFragmentCompat(),
DataStore.dirty = true
true
} catch (exc: RuntimeException) {
Snackbar.make(view!!, exc.readableMessage, Snackbar.LENGTH_LONG).show()
Snackbar.make(requireView(), exc.readableMessage, Snackbar.LENGTH_LONG).show()
false
}
......@@ -217,7 +217,7 @@ class ProfileConfigFragment : PreferenceFragmentCompat(),
plugin.value = pluginConfiguration.selected
pluginConfigure.isEnabled = selected !is NoPlugin
pluginConfigure.text = pluginConfiguration.getOptions().toString()
if (!selected.trusted) Snackbar.make(view!!, R.string.plugin_untrusted, Snackbar.LENGTH_LONG).show()
if (!selected.trusted) Snackbar.make(requireView(), R.string.plugin_untrusted, Snackbar.LENGTH_LONG).show()
}
REQUEST_CODE_PLUGIN_CONFIGURE -> when (resultCode) {
Activity.RESULT_OK -> {
......
......@@ -220,7 +220,7 @@ class SubscriptionFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener
toolbar.setTitle(R.string.subscriptions)
toolbar.inflateMenu(R.menu.subscription_menu)
toolbar.setOnMenuItemClickListener(this)
SubscriptionService.idle.observe(this) {
SubscriptionService.idle.observe(viewLifecycleOwner) {
toolbar.menu.findItem(R.id.action_update_subscription).isEnabled = it
}
val activity = activity as MainActivity
......
......@@ -54,6 +54,9 @@ android {
sourceSets.main.jniLibs.srcDirs +=
new File(project(':core').buildDir, "intermediates/bundles/${getCurrentFlavor()}/jni")
ndkVersion rootProject.ndkVersion
lintOptions {
disable 'InvalidPackage'
}
}
dependencies {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment