mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-04-04 02:31:08 +02:00
using hte previous way of checking current note type
This commit is contained in:
parent
628784c213
commit
b956dd017f
@ -143,7 +143,7 @@ class MainActivity : SimpleActivity() {
|
|||||||
findItem(R.id.open_note).isVisible = multipleNotesExist
|
findItem(R.id.open_note).isVisible = multipleNotesExist
|
||||||
findItem(R.id.delete_note).isVisible = multipleNotesExist
|
findItem(R.id.delete_note).isVisible = multipleNotesExist
|
||||||
findItem(R.id.export_all_notes).isVisible = multipleNotesExist
|
findItem(R.id.export_all_notes).isVisible = multipleNotesExist
|
||||||
findItem(R.id.open_search).isVisible = mCurrentNote.type == NoteType.TYPE_TEXT.value
|
findItem(R.id.open_search).isVisible = !isCurrentItemChecklist()
|
||||||
findItem(R.id.import_folder).isVisible = hasPermission(PERMISSION_READ_STORAGE)
|
findItem(R.id.import_folder).isVisible = hasPermission(PERMISSION_READ_STORAGE)
|
||||||
|
|
||||||
saveNoteButton = findItem(R.id.save_note)
|
saveNoteButton = findItem(R.id.save_note)
|
||||||
@ -229,6 +229,8 @@ class MainActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun isCurrentItemChecklist() = mAdapter?.isChecklistFragment(view_pager.currentItem) ?: false
|
||||||
|
|
||||||
private fun checkIntents(intent: Intent) {
|
private fun checkIntents(intent: Intent) {
|
||||||
intent.apply {
|
intent.apply {
|
||||||
if (action == Intent.ACTION_SEND && type == MIME_TEXT_PLAIN) {
|
if (action == Intent.ACTION_SEND && type == MIME_TEXT_PLAIN) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user