Nip13 pow (#357)

* add pow

* animation

* matrix style

* animation better

* improve animation

* improve animation

* works

* fix jump

* difficulty indicator

* 10 is default

* animation runs forever

* pow in message timestamp

* pow works

* default on

* adjust animation

* no printing
This commit is contained in:
callebtc
2025-08-31 13:23:22 +02:00
committed by GitHub
parent 5b62118336
commit b62b15a21f
13 changed files with 1182 additions and 108 deletions
@@ -117,11 +117,18 @@ fun formatMessageAsAnnotatedString(
appendIOSFormattedContent(builder, message.content, message.mentions, currentUserNickname, baseColor, isSelf, isDark)
// iOS-style timestamp at the END (smaller, grey)
// Timestamp (and optional PoW badge)
builder.pushStyle(SpanStyle(
color = Color.Gray.copy(alpha = 0.7f),
fontSize = (BASE_FONT_SIZE - 4).sp
))
builder.append(" [${timeFormatter.format(message.timestamp)}]")
// If message has valid PoW difficulty, append bits immediately after timestamp with minimal spacing
//message.powDifficulty?.let { bits ->
// if (bits > 0) {
// builder.append(" ${bits}b")
// }
//}
builder.pop()
} else {