mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-07-20 09:12:22 +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 authorName = gKindONames[profilePubkey]?.name??"";
|
||||||
String pronoun = "";
|
String pronoun = "";
|
||||||
if( profilePubkey == userPublicKey) {
|
if( profilePubkey == userPublicKey) {
|
||||||
printUnderlined("\nYour profile ($authorName):");
|
printUnderlined("\nYour profile - $authorName:");
|
||||||
pronoun = "You";
|
pronoun = "You";
|
||||||
} else {
|
} else {
|
||||||
printUnderlined("\nProfile for $authorName");
|
printUnderlined("\nProfile for $authorName");
|
||||||
@ -326,15 +326,17 @@ void printProfile(Store node, String profilePubkey) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// print social distance info.
|
// print mutual follows
|
||||||
node.printSocialDistance(profileContactEvent, authorName);
|
node.printMutualFollows(profileContactEvent, authorName);
|
||||||
print("");
|
print("");
|
||||||
|
|
||||||
|
// print follow list
|
||||||
stdout.write("$pronoun follow ${profileContactEvent.eventData.contactList.length} accounts: ");
|
stdout.write("$pronoun follow ${profileContactEvent.eventData.contactList.length} accounts: ");
|
||||||
profileContactEvent.eventData.contactList.forEach((x) => stdout.write("${getAuthorName(x.id)}, "));
|
profileContactEvent.eventData.contactList.forEach((x) => stdout.write("${getAuthorName(x.id)}, "));
|
||||||
print("\n");
|
print("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// print followers
|
||||||
List<String> followers = node.getFollowers(profilePubkey);
|
List<String> followers = node.getFollowers(profilePubkey);
|
||||||
stdout.write("$pronoun have ${followers.length} followers: ");
|
stdout.write("$pronoun have ${followers.length} followers: ");
|
||||||
followers.forEach((x) => stdout.write("${getAuthorName(x)}, "));
|
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
|
// 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 otherPubkey = contactEvent.eventData.pubkey;
|
||||||
String otherName = getAuthorName(otherPubkey);
|
String otherName = getAuthorName(otherPubkey);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user