show the notes content if it gets unlocked

This commit is contained in:
tibbi 2021-05-21 09:32:41 +02:00
parent ea22778f1a
commit 8e09ac7c99
2 changed files with 5 additions and 1 deletions

View File

@ -1084,6 +1084,10 @@ class MainActivity : SimpleActivity() {
mCurrentNote.protectionHash = ""
mCurrentNote.protectionType = PROTECTION_NONE
NotesHelper(this).insertOrUpdateNote(mCurrentNote) {
getCurrentFragment()?.apply {
shouldShowLockedContent = true
checkLockState()
}
invalidateOptionsMenu()
}
}

View File

@ -14,8 +14,8 @@ import com.simplemobiletools.notes.pro.models.Note
import kotlinx.android.synthetic.main.fragment_checklist.view.*
abstract class NoteFragment : Fragment() {
protected var shouldShowLockedContent = false
protected var note: Note? = null
var shouldShowLockedContent = false
protected fun setupLockedViews(view: ViewGroup, note: Note) {
view.apply {