From 8e09ac7c99745443a3f134103f1605a5759fbd53 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 21 May 2021 09:32:41 +0200 Subject: [PATCH] show the notes content if it gets unlocked --- .../simplemobiletools/notes/pro/activities/MainActivity.kt | 4 ++++ .../com/simplemobiletools/notes/pro/fragments/NoteFragment.kt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/MainActivity.kt index 951f3ad5..c7c35d91 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/MainActivity.kt @@ -1084,6 +1084,10 @@ class MainActivity : SimpleActivity() { mCurrentNote.protectionHash = "" mCurrentNote.protectionType = PROTECTION_NONE NotesHelper(this).insertOrUpdateNote(mCurrentNote) { + getCurrentFragment()?.apply { + shouldShowLockedContent = true + checkLockState() + } invalidateOptionsMenu() } } diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/pro/fragments/NoteFragment.kt b/app/src/main/kotlin/com/simplemobiletools/notes/pro/fragments/NoteFragment.kt index 46663a03..d0d4470d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/pro/fragments/NoteFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/pro/fragments/NoteFragment.kt @@ -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 {