kopia lustrzana https://github.com/vitorpamplona/amethyst
Fixes bug when note is not included in the returning set.
rodzic
b1bdd20255
commit
236177c6ce
|
@ -6,10 +6,10 @@ import kotlin.time.measureTimedValue
|
||||||
class ThreadAssembler {
|
class ThreadAssembler {
|
||||||
|
|
||||||
fun searchRoot(note: Note, testedNotes: MutableSet<Note> = mutableSetOf()): Note? {
|
fun searchRoot(note: Note, testedNotes: MutableSet<Note> = mutableSetOf()): Note? {
|
||||||
testedNotes.add(note)
|
|
||||||
|
|
||||||
if (note.replyTo == null || note.replyTo?.isEmpty() == true) return note
|
if (note.replyTo == null || note.replyTo?.isEmpty() == true) return note
|
||||||
|
|
||||||
|
testedNotes.add(note)
|
||||||
|
|
||||||
val markedAsRoot = note.event?.tags?.firstOrNull { it[0] == "e" && it.size > 3 && it[3] == "root" }?.getOrNull(1)
|
val markedAsRoot = note.event?.tags?.firstOrNull { it[0] == "e" && it.size > 3 && it[3] == "root" }?.getOrNull(1)
|
||||||
if (markedAsRoot != null) return LocalCache.checkGetOrCreateNote(markedAsRoot)
|
if (markedAsRoot != null) return LocalCache.checkGetOrCreateNote(markedAsRoot)
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue