mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-07-12 13:22:20 +02:00
minor profile ui improvement
This commit is contained in:
@ -287,7 +287,7 @@ void printProfile(Store node, String profilePubkey) {
|
||||
String authorName = gKindONames[profilePubkey]?.name??"";
|
||||
String pronoun = "";
|
||||
if( profilePubkey == userPublicKey) {
|
||||
printUnderlined("\nYour profile ($authorName):");
|
||||
printUnderlined("\nYour profile - $authorName:");
|
||||
pronoun = "You";
|
||||
} else {
|
||||
printUnderlined("\nProfile for $authorName");
|
||||
@ -326,15 +326,17 @@ void printProfile(Store node, String profilePubkey) {
|
||||
}
|
||||
}
|
||||
|
||||
// print social distance info.
|
||||
node.printSocialDistance(profileContactEvent, authorName);
|
||||
// print mutual follows
|
||||
node.printMutualFollows(profileContactEvent, authorName);
|
||||
print("");
|
||||
|
||||
// print follow list
|
||||
stdout.write("$pronoun follow ${profileContactEvent.eventData.contactList.length} accounts: ");
|
||||
profileContactEvent.eventData.contactList.forEach((x) => stdout.write("${getAuthorName(x.id)}, "));
|
||||
print("\n");
|
||||
}
|
||||
|
||||
// print followers
|
||||
List<String> followers = node.getFollowers(profilePubkey);
|
||||
stdout.write("$pronoun have ${followers.length} followers: ");
|
||||
followers.forEach((x) => stdout.write("${getAuthorName(x)}, "));
|
||||
|
@ -2099,7 +2099,7 @@ class Store {
|
||||
}
|
||||
|
||||
// finds all your followers, and then finds which of them follow the otherPubkey
|
||||
void printSocialDistance(Event contactEvent, String otherName) {
|
||||
void printMutualFollows(Event contactEvent, String otherName) {
|
||||
String otherPubkey = contactEvent.eventData.pubkey;
|
||||
String otherName = getAuthorName(otherPubkey);
|
||||
|
||||
|
Reference in New Issue
Block a user