File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
app/src/main/kotlin/com/simplemobiletools/notes/pro Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -482,9 +482,10 @@ class MainActivity : SimpleActivity() {
482482 }
483483 }
484484
485- private fun displayNewNoteDialog (value : String = "", title : String? = null) {
485+ private fun displayNewNoteDialog (value : String = "", title : String? = null, path : String = "" ) {
486486 NewNoteDialog (this , title) {
487487 it.value = value
488+ it.path = path
488489 addNewNote(it)
489490 }
490491 }
@@ -540,7 +541,7 @@ class MainActivity : SimpleActivity() {
540541 } else {
541542 runOnUiThread {
542543 OpenFileDialog (this , it.path) {
543- displayNewNoteDialog(it.value, title = it.title)
544+ displayNewNoteDialog(it.value, title = it.title, it.path )
544545 }
545546 }
546547 }
Original file line number Diff line number Diff line change @@ -9,11 +9,11 @@ import java.io.FileNotFoundException
99
1010@Entity(tableName = " notes" , indices = [(Index (value = [" id" ], unique = true ))])
1111data class Note (
12- @PrimaryKey(autoGenerate = true ) var id : Long? ,
13- @ColumnInfo(name = " title" ) var title : String ,
14- @ColumnInfo(name = " value" ) var value : String ,
15- @ColumnInfo(name = " type" ) var type : Int ,
16- @ColumnInfo(name = " path" ) var path : String = " " ) {
12+ @PrimaryKey(autoGenerate = true ) var id : Long? ,
13+ @ColumnInfo(name = " title" ) var title : String ,
14+ @ColumnInfo(name = " value" ) var value : String ,
15+ @ColumnInfo(name = " type" ) var type : Int ,
16+ @ColumnInfo(name = " path" ) var path : String = " " ) {
1717
1818 fun getNoteStoredValue (): String? {
1919 return if (path.isNotEmpty()) {
You can’t perform that action at this time.
0 commit comments