diff --git a/src/api/users.ts b/src/api/users.ts
index 9f48879..a229ba3 100644
--- a/src/api/users.ts
+++ b/src/api/users.ts
@@ -37,6 +37,7 @@ export interface Profile {
followers_count: number;
following_count: number;
+ subscribers_count: number;
statuses_count: number;
}
@@ -55,6 +56,7 @@ export function guest() {
fields: [],
followers_count: 0,
following_count: 0,
+ subscribers_count: 0,
statuses_count: 0,
}
}
diff --git a/src/views/Profile.vue b/src/views/Profile.vue
index 2f8b723..e159cfa 100644
--- a/src/views/Profile.vue
+++ b/src/views/Profile.vue
@@ -148,6 +148,10 @@
{{ profile.following_count }}
following
+
+ {{ profile.subscribers_count }}
+ subscribers
+
@@ -433,20 +437,22 @@ async function onVerifyEthereumAddress() {
}
}
-function canManageSubscriptions(): boolean {
- // Only users with verified address can configure subscription
+function isSubscriptionsFeatureEnabled(): boolean {
const blockchain = instance?.blockchains[0]
+ return Boolean(blockchain?.features.subscriptions)
+}
+
+function canManageSubscriptions(): boolean {
return (
- Boolean(blockchain?.features.subscriptions) &&
+ isSubscriptionsFeatureEnabled() &&
profile !== null &&
isCurrentUser()
)
}
function canSubscribe(): boolean {
- const blockchain = instance?.blockchains[0]
return (
- Boolean(blockchain?.features.subscriptions) &&
+ isSubscriptionsFeatureEnabled() &&
profile !== null &&
profile.getSubscriptionPageLocation() !== null &&
!isCurrentUser()