From 1ae83563612d82e91aa7f89680466cfad311f201 Mon Sep 17 00:00:00 2001 From: Matthew Lorentz Date: Fri, 17 Nov 2023 17:38:39 -0500 Subject: [PATCH] Change followers to followers you know and fix bug in follow count --- CHANGELOG.md | 3 +++ Nos/Assets/Localization/Localized.swift | 3 ++- Nos/Assets/Localization/en.lproj/Generated.strings | 3 ++- Nos/Views/ProfileSocialStatsView.swift | 2 +- Nos/Views/ProfileView.swift | 4 ++-- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd136a7a4..9aa58ea3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- Change the "Followed by" label on the profile screen to "Followers you know" +- Fixed an issue where the Profile view would always show "Following 0" for people you didn't follow. + ## [0.1 (93)] - 2023-11-10Z - Added a confirmation before reposting a note. diff --git a/Nos/Assets/Localization/Localized.swift b/Nos/Assets/Localization/Localized.swift index e54e8f9c4..44ab2b15b 100644 --- a/Nos/Assets/Localization/Localized.swift +++ b/Nos/Assets/Localization/Localized.swift @@ -156,9 +156,10 @@ enum Localized: String, Localizable, CaseIterable { case profileTitle = "Profile" case profile = "profile" case follow = "Follow" + case followers = "Followers" case follows = "Follows" case following = "Following" - case followedBy = "Followed by" + case followersYouKnow = "Followers you know" case followedByOne = "Followed by **{{ one }}**" case followedByOneAndMore = "Followed by **{{ one }}** and **{{ count }} others**" case followedByTwo = "Followed by **{{ one }}** and **{{ two }}**" diff --git a/Nos/Assets/Localization/en.lproj/Generated.strings b/Nos/Assets/Localization/en.lproj/Generated.strings index 9439bb884..ec975ad6c 100644 --- a/Nos/Assets/Localization/en.lproj/Generated.strings +++ b/Nos/Assets/Localization/en.lproj/Generated.strings @@ -95,9 +95,10 @@ "Localized.profileTitle" = "Profile"; "Localized.profile" = "profile"; "Localized.follow" = "Follow"; +"Localized.followers" = "Followers"; "Localized.follows" = "Follows"; "Localized.following" = "Following"; -"Localized.followedBy" = "Followed by"; +"Localized.followersYouKnow" = "Followers you know"; "Localized.followedByOne" = "Followed by **{{ one }}**"; "Localized.followedByOneAndMore" = "Followed by **{{ one }}** and **{{ count }} others**"; "Localized.followedByTwo" = "Followed by **{{ one }}** and **{{ two }}**"; diff --git a/Nos/Views/ProfileSocialStatsView.swift b/Nos/Views/ProfileSocialStatsView.swift index 0980fe282..9d80252cb 100644 --- a/Nos/Views/ProfileSocialStatsView.swift +++ b/Nos/Views/ProfileSocialStatsView.swift @@ -43,7 +43,7 @@ struct ProfileSocialStatsView: View { ) ) } label: { - tab(label: .followedBy, value: author.followers.count) + tab(label: .followersYouKnow, value: author.followers.count) } Spacer(minLength: 0) } diff --git a/Nos/Views/ProfileView.swift b/Nos/Views/ProfileView.swift index e0d3af087..203092d04 100644 --- a/Nos/Views/ProfileView.swift +++ b/Nos/Views/ProfileView.swift @@ -75,7 +75,7 @@ struct ProfileView: View { contentsOf: await relayService.requestProfileData( for: authorKey, lastUpdateMetadata: author.lastUpdatedMetadata, - lastUpdatedContactList: author.lastUpdatedContactList + lastUpdatedContactList: nil // always grab contact list because we purge follows aggressively ) ) @@ -147,7 +147,7 @@ struct ProfileView: View { FollowsView(title: Localized.follows, authors: destination.follows) } .navigationDestination(for: FollowersDestination.self) { destination in - FollowsView(title: Localized.followedBy, authors: destination.followers) + FollowsView(title: Localized.followers, authors: destination.followers) } .navigationDestination(for: RelaysDestination.self) { destination in RelayView(author: destination.author, editable: false)