mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-04-20 10:17:23 +02:00
adding some widget handling related improvements
This commit is contained in:
parent
87d1fba95d
commit
26ed93e428
@ -101,8 +101,22 @@ class WidgetConfigureActivity : SimpleActivity() {
|
|||||||
NotesHelper(this).getNotes {
|
NotesHelper(this).getNotes {
|
||||||
mNotes = it
|
mNotes = it
|
||||||
notes_picker_holder.beVisibleIf(mNotes.size > 1 && !mIsCustomizingColors)
|
notes_picker_holder.beVisibleIf(mNotes.size > 1 && !mIsCustomizingColors)
|
||||||
val note = mNotes.firstOrNull { !it.isLocked() } ?: return@getNotes
|
var note = mNotes.firstOrNull { !it.isLocked() }
|
||||||
|
|
||||||
|
if (mNotes.size == 1 && note == null) {
|
||||||
|
note = mNotes.first()
|
||||||
|
SecurityDialog(this, note.protectionHash, note.protectionType) { hash, type, success ->
|
||||||
|
if (success) {
|
||||||
updateCurrentNote(note)
|
updateCurrentNote(note)
|
||||||
|
} else {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (note != null) {
|
||||||
|
updateCurrentNote(note)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user