From c9bea5ea19abbd36c2ed528583629666a33372eb Mon Sep 17 00:00:00 2001 From: Vishal <64505169+vishalxl@users.noreply.github.com> Date: Sat, 3 Dec 2022 17:52:19 +0530 Subject: [PATCH] minor profile ui improvement --- lib/console_ui.dart | 8 +++++--- lib/tree_ds.dart | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/console_ui.dart b/lib/console_ui.dart index f9588d4..f0f506f 100644 --- a/lib/console_ui.dart +++ b/lib/console_ui.dart @@ -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 followers = node.getFollowers(profilePubkey); stdout.write("$pronoun have ${followers.length} followers: "); followers.forEach((x) => stdout.write("${getAuthorName(x)}, ")); diff --git a/lib/tree_ds.dart b/lib/tree_ds.dart index a131402..71ce041 100644 --- a/lib/tree_ds.dart +++ b/lib/tree_ds.dart @@ -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);