Skip to content

Commit

Permalink
Fixed bug that caused notes to lose their formatting upon edit
Browse files Browse the repository at this point in the history
  • Loading branch information
OmGodse committed May 26, 2020
1 parent e5a63a5 commit 03f14e6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import android.text.style.StyleSpan
import android.text.style.TypefaceSpan
import com.omgodse.notally.helpers.NotesHelper
import com.omgodse.notally.miscellaneous.SpanRepresentation
import com.omgodse.notally.miscellaneous.applySpans
import com.omgodse.notally.xml.XMLReader
import com.omgodse.notally.xml.XMLTags
import com.omgodse.notally.xml.XMLWriter
Expand Down Expand Up @@ -44,7 +45,7 @@ class TakeNoteModel(private val app: Application) : BaseModel(app) {
val xmlReader = XMLReader(file)
title = xmlReader.getTitle()
timestamp = xmlReader.getTimestamp().toLong()
body = Editable.Factory.getInstance().newEditable(xmlReader.getBody())
body = xmlReader.getBody().applySpans(xmlReader.getSpans())
labels.value = xmlReader.getLabels()
}
}
Expand Down

0 comments on commit 03f14e6

Please sign in to comment.