Skip to content

Commit b956dd0

Browse files
committed
using hte previous way of checking current note type
1 parent 628784c commit b956dd0

File tree

1 file changed

+3
-1
lines changed
  • app/src/main/kotlin/com/simplemobiletools/notes/pro/activities

1 file changed

+3
-1
lines changed

app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/MainActivity.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class MainActivity : SimpleActivity() {
143143
findItem(R.id.open_note).isVisible = multipleNotesExist
144144
findItem(R.id.delete_note).isVisible = multipleNotesExist
145145
findItem(R.id.export_all_notes).isVisible = multipleNotesExist
146-
findItem(R.id.open_search).isVisible = mCurrentNote.type == NoteType.TYPE_TEXT.value
146+
findItem(R.id.open_search).isVisible = !isCurrentItemChecklist()
147147
findItem(R.id.import_folder).isVisible = hasPermission(PERMISSION_READ_STORAGE)
148148

149149
saveNoteButton = findItem(R.id.save_note)
@@ -229,6 +229,8 @@ class MainActivity : SimpleActivity() {
229229
}
230230
}
231231

232+
private fun isCurrentItemChecklist() = mAdapter?.isChecklistFragment(view_pager.currentItem) ?: false
233+
232234
private fun checkIntents(intent: Intent) {
233235
intent.apply {
234236
if (action == Intent.ACTION_SEND && type == MIME_TEXT_PLAIN) {

0 commit comments

Comments
 (0)