diff --git a/MastodonSDK/Sources/MastodonUI/View/Content/UserView+ViewModel.swift b/MastodonSDK/Sources/MastodonUI/View/Content/UserView+ViewModel.swift index c70ca4588..f61e7a2e6 100644 --- a/MastodonSDK/Sources/MastodonUI/View/Content/UserView+ViewModel.swift +++ b/MastodonSDK/Sources/MastodonUI/View/Content/UserView+ViewModel.swift @@ -30,6 +30,10 @@ extension UserView { } extension UserView.ViewModel { + private static var metricFormatter: MastodonMetricFormatter = { + return MastodonMetricFormatter() + }() + func bind(userView: UserView) { // avatar Publishers.CombineLatest( @@ -87,7 +91,7 @@ extension UserView.ViewModel { } userView.authorFollowersLabel.attributedText = NSAttributedString( format: NSAttributedString(string: "%@ followers", attributes: [.font: Font.systemFont(ofSize: 15, weight: .regular)]), - args: NSAttributedString(string: count.formatted(), attributes: [.font: Font.systemFont(ofSize: 15, weight: .bold)]) + args: NSAttributedString(string: Self.metricFormatter.string(from: count) ?? count.formatted(), attributes: [.font: Font.systemFont(ofSize: 15, weight: .bold)]) ) } .store(in: &disposeBag)