minor profile ui improvement

This commit is contained in:
Vishal
2022-12-03 17:52:19 +05:30
parent 54770e78d6
commit c9bea5ea19
2 changed files with 6 additions and 4 deletions

View File

@ -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)}, "));

View File

@ -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);