Skip to content

Commit ca32224

Browse files
committed
show the password warning before every locking
1 parent 73508db commit ca32224

File tree

1 file changed

+9
-10
lines changed
  • app/src/main/kotlin/com/simplemobiletools/notes/pro/activities

1 file changed

+9
-10
lines changed

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

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ import android.webkit.WebView
2020
import android.webkit.WebViewClient
2121
import android.widget.ImageView
2222
import android.widget.TextView
23-
import com.simplemobiletools.commons.dialogs.ConfirmationAdvancedDialog
24-
import com.simplemobiletools.commons.dialogs.FilePickerDialog
25-
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
26-
import com.simplemobiletools.commons.dialogs.SecurityDialog
23+
import com.simplemobiletools.commons.dialogs.*
2724
import com.simplemobiletools.commons.extensions.*
2825
import com.simplemobiletools.commons.helpers.*
2926
import com.simplemobiletools.commons.models.FAQItem
@@ -1065,12 +1062,14 @@ class MainActivity : SimpleActivity() {
10651062
}
10661063

10671064
private fun lockNote() {
1068-
SecurityDialog(this, "", SHOW_ALL_TABS) { hash, type, success ->
1069-
if (success) {
1070-
mCurrentNote.protectionHash = hash
1071-
mCurrentNote.protectionType = type
1072-
NotesHelper(this).insertOrUpdateNote(mCurrentNote) {
1073-
invalidateOptionsMenu()
1065+
ConfirmationDialog(this, "", R.string.locking_warning, R.string.ok, R.string.cancel) {
1066+
SecurityDialog(this, "", SHOW_ALL_TABS) { hash, type, success ->
1067+
if (success) {
1068+
mCurrentNote.protectionHash = hash
1069+
mCurrentNote.protectionType = type
1070+
NotesHelper(this).insertOrUpdateNote(mCurrentNote) {
1071+
invalidateOptionsMenu()
1072+
}
10741073
}
10751074
}
10761075
}

0 commit comments

Comments
 (0)