This commit is contained in:
@@ -283,6 +283,8 @@ open class NewPostViewModel() : ViewModel() {
|
|||||||
(originalNote?.event as? TextNoteEvent)?.root() // if it has a marker as root
|
(originalNote?.event as? TextNoteEvent)?.root() // if it has a marker as root
|
||||||
?: originalNote?.replyTo?.firstOrNull { it.event != null && it.replyTo?.isEmpty() == true }?.idHex // if it has loaded events with zero replies in the reply list
|
?: originalNote?.replyTo?.firstOrNull { it.event != null && it.replyTo?.isEmpty() == true }?.idHex // if it has loaded events with zero replies in the reply list
|
||||||
?: originalNote?.replyTo?.firstOrNull()?.idHex // old rules, first item is root.
|
?: originalNote?.replyTo?.firstOrNull()?.idHex // old rules, first item is root.
|
||||||
|
?: originalNote?.idHex
|
||||||
|
|
||||||
val replyId = originalNote?.idHex
|
val replyId = originalNote?.idHex
|
||||||
|
|
||||||
account?.sendPost(
|
account?.sendPost(
|
||||||
|
|||||||
@@ -43,10 +43,10 @@ class TextNoteEvent(
|
|||||||
): TextNoteEvent {
|
): TextNoteEvent {
|
||||||
val tags = mutableListOf<List<String>>()
|
val tags = mutableListOf<List<String>>()
|
||||||
replyTos?.forEach {
|
replyTos?.forEach {
|
||||||
if (it == replyingTo) {
|
if (it == root) {
|
||||||
tags.add(listOf("e", it, "", "reply"))
|
|
||||||
} else if (it == root) {
|
|
||||||
tags.add(listOf("e", it, "", "root"))
|
tags.add(listOf("e", it, "", "root"))
|
||||||
|
} else if (it == replyingTo) {
|
||||||
|
tags.add(listOf("e", it, "", "reply"))
|
||||||
} else if (it in directMentions) {
|
} else if (it in directMentions) {
|
||||||
tags.add(listOf("e", it, "", "mention"))
|
tags.add(listOf("e", it, "", "mention"))
|
||||||
} else {
|
} else {
|
||||||
@@ -62,10 +62,10 @@ class TextNoteEvent(
|
|||||||
}
|
}
|
||||||
addresses?.forEach {
|
addresses?.forEach {
|
||||||
val aTag = it.toTag()
|
val aTag = it.toTag()
|
||||||
if (aTag == replyingTo) {
|
if (aTag == root) {
|
||||||
tags.add(listOf("a", aTag, "", "reply"))
|
|
||||||
} else if (aTag == root) {
|
|
||||||
tags.add(listOf("a", aTag, "", "root"))
|
tags.add(listOf("a", aTag, "", "root"))
|
||||||
|
} else if (aTag == replyingTo) {
|
||||||
|
tags.add(listOf("a", aTag, "", "reply"))
|
||||||
} else if (aTag in directMentions) {
|
} else if (aTag in directMentions) {
|
||||||
tags.add(listOf("a", aTag, "", "mention"))
|
tags.add(listOf("a", aTag, "", "mention"))
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user