diff --git a/src/main/java/com/nextcloud/client/etm/pages/EtmPreferencesFragment.kt b/src/main/java/com/nextcloud/client/etm/pages/EtmPreferencesFragment.kt index 9c55fa77d7..68866d1c1d 100644 --- a/src/main/java/com/nextcloud/client/etm/pages/EtmPreferencesFragment.kt +++ b/src/main/java/com/nextcloud/client/etm/pages/EtmPreferencesFragment.kt @@ -49,13 +49,13 @@ class EtmPreferencesFragment : EtmBaseFragment() { etm_preferences_text.text = builder } - override fun onCreateOptionsMenu(menu: Menu?, inflater: MenuInflater?) { + override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { super.onCreateOptionsMenu(menu, inflater) - inflater?.inflate(R.menu.etm_preferences, menu) + inflater.inflate(R.menu.etm_preferences, menu) } - override fun onOptionsItemSelected(item: MenuItem?): Boolean { - return when (item?.itemId) { + override fun onOptionsItemSelected(item: MenuItem): Boolean { + return when (item.itemId) { R.id.etm_preferences_share -> { onClickedShare(); true }