Removed lazy option

This commit is contained in:
Agnieszka C 2022-03-08 13:03:51 +01:00
parent 84620282a8
commit 3137d6273b

View File

@ -77,7 +77,6 @@ class MainActivity : SimpleActivity() {
private var searchIndex = 0
private var searchMatches = emptyList<Int>()
private var isSearchActive = false
private val notesExporter by lazy { NotesExporter(this) }
private lateinit var searchQueryET: MyEditText
private lateinit var searchPrevBtn: ImageView
@ -883,6 +882,7 @@ class MainActivity : SimpleActivity() {
private fun exportNotesTo(outputStream: OutputStream?) {
toast(R.string.exporting)
ensureBackgroundThread {
val notesExporter = NotesExporter(this)
notesExporter.exportNotes(outputStream) {
val toastId = when (it) {
NotesExporter.ExportResult.EXPORT_OK -> R.string.exporting_successful