ndb: switch profile queries to use transactions
this should ensure no crashing occurs when querying profiles
This commit is contained in:
@@ -24,10 +24,11 @@ struct ReplyView: View {
|
||||
var ReplyingToSection: some View {
|
||||
HStack {
|
||||
Group {
|
||||
let txn = NdbTxn(ndb: damus.ndb)
|
||||
let names = references
|
||||
.map { pubkey in
|
||||
let pk = pubkey
|
||||
let prof = damus.profiles.lookup(id: pk)
|
||||
let prof = damus.ndb.lookup_profile_with_txn(pk, txn: txn)?.profile
|
||||
return "@" + Profile.displayName(profile: prof, pubkey: pk).username.truncate(maxLength: 50)
|
||||
}
|
||||
.joined(separator: " ")
|
||||
|
||||
Reference in New Issue
Block a user