Commit 89183820 authored by Ricki Hirner's avatar Ricki Hirner 🐑

Use requireView() instead of view!! and requireActivity() instead of activity!!

parent e30c4182
Pipeline #122903279 failed with stages
in 9 minutes and 6 seconds
......@@ -107,7 +107,7 @@ class AppSettingsActivity: AppCompatActivity() {
summary = host
true
} catch(e: URISyntaxException) {
Snackbar.make(view!!, e.localizedMessage, Snackbar.LENGTH_LONG).show()
Snackbar.make(requireView(), e.localizedMessage, Snackbar.LENGTH_LONG).show()
false
}
}
......@@ -149,12 +149,12 @@ class AppSettingsActivity: AppCompatActivity() {
settings.remove(StartupDialogFragment.HINT_AUTOSTART_PERMISSIONS)
settings.remove(StartupDialogFragment.HINT_BATTERY_OPTIMIZATIONS)
settings.remove(StartupDialogFragment.HINT_OPENTASKS_NOT_INSTALLED)
Snackbar.make(view!!, R.string.app_settings_reset_hints_success, Snackbar.LENGTH_LONG).show()
Snackbar.make(requireView(), R.string.app_settings_reset_hints_success, Snackbar.LENGTH_LONG).show()
}
private fun resetCertificates() {
if (CustomCertManager.resetCertificates(activity!!))
Snackbar.make(view!!, getString(R.string.app_settings_reset_certificates_success), Snackbar.LENGTH_LONG).show()
if (CustomCertManager.resetCertificates(requireActivity()))
Snackbar.make(requireView(), getString(R.string.app_settings_reset_certificates_success), Snackbar.LENGTH_LONG).show()
}
}
......
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