mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-03-22 19:40:07 +01:00
simplify the current note type checker
This commit is contained in:
parent
25cb371868
commit
7550daf5a5
@ -143,7 +143,7 @@ class MainActivity : SimpleActivity() {
|
||||
findItem(R.id.open_note).isVisible = multipleNotesExist
|
||||
findItem(R.id.delete_note).isVisible = multipleNotesExist
|
||||
findItem(R.id.export_all_notes).isVisible = multipleNotesExist
|
||||
findItem(R.id.open_search).isVisible = !currentItemIsCheckList
|
||||
findItem(R.id.open_search).isVisible = mCurrentNote.type == NoteType.TYPE_TEXT.value
|
||||
findItem(R.id.import_folder).isVisible = hasPermission(PERMISSION_READ_STORAGE)
|
||||
|
||||
saveNoteButton = findItem(R.id.save_note)
|
||||
@ -229,8 +229,6 @@ class MainActivity : SimpleActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
private val currentItemIsCheckList get() = mAdapter?.isChecklistFragment(view_pager.currentItem) ?: false
|
||||
|
||||
private fun checkIntents(intent: Intent) {
|
||||
intent.apply {
|
||||
if (action == Intent.ACTION_SEND && type == MIME_TEXT_PLAIN) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user