Add Timeline switcher button in PostingTimelineView. Switch between your following or NIP-81 favorites. User can favorite a user via ProfileActionSheetView or ProfileView.

Closes: https://github.com/damus-io/damus/issues/2438
Changelog-Added: Add Timeline switcher button for NIP-81-favorites
Signed-off-by: Askeew <askeew@hotmail.com>
This commit is contained in:
Askia Linder
2025-08-27 09:23:20 +02:00
committed by Daniel D’Aquino
parent 6605c5e583
commit 61f695b7c6
22 changed files with 767 additions and 31 deletions

View File

@@ -872,4 +872,31 @@ extension NostrEvent {
return nil
}
}
#if DEBUG
var debugDescription: String {
var output = "🔍 NostrEvent Debug Info\n"
output += "═══════════════════════════\n"
output += "📝 ID: \(id)\n"
output += "👤 Pubkey: \(pubkey)\n"
output += "📅 Created: \(Date(timeIntervalSince1970: TimeInterval(created_at))) (\(created_at))\n"
output += "🏷️ Kind: \(kind) (\(String(describing: known_kind))\n"
output += "✍️ Signature: \(sig)\n"
output += "📄 Content (\(content.count) chars):\n"
output += " \"\(content.prefix(100))\(content.count > 100 ? "..." : "")\"\n"
output += "\n🏷️ Tags (\(tags.count) total):\n"
for (index, tag) in tags.enumerated() {
output += " [\(index)]: ["
for (tagIndex, tagElem) in tag.enumerated() {
if tagIndex > 0 { output += ", " }
output += "\"\(tagElem.string())\""
}
output += "]\n"
}
output += "═══════════════════════════\n"
return output
}
#endif
}

View File

@@ -31,5 +31,6 @@ enum NostrKind: UInt32, Codable {
case nwc_response = 23195
case http_auth = 27235
case status = 30315
case contact_card = 30_382
case follow_list = 39089
}