mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-24 06:37:14 -04:00
chore: only fetch billing info when current user is the workspace owner (#6847)
This commit is contained in:
parent
3d8e6ebd72
commit
1bcda3944f
1 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:appflowy/core/helpers/url_launcher.dart';
|
||||
import 'package:appflowy/shared/af_role_pb_extension.dart';
|
||||
import 'package:appflowy/user/application/user_service.dart';
|
||||
import 'package:appflowy_backend/dispatch/dispatch.dart';
|
||||
import 'package:appflowy_backend/log.dart';
|
||||
|
@ -44,6 +45,10 @@ class WorkspaceMemberBloc
|
|||
(e) => [],
|
||||
);
|
||||
final myRole = _getMyRole(members);
|
||||
|
||||
if (myRole.isOwner) {
|
||||
unawaited(_fetchWorkspaceSubscriptionInfo());
|
||||
}
|
||||
emit(
|
||||
state.copyWith(
|
||||
members: members,
|
||||
|
@ -215,8 +220,6 @@ class WorkspaceMemberBloc
|
|||
_workspaceId = '';
|
||||
});
|
||||
}
|
||||
|
||||
unawaited(_fetchWorkspaceSubscriptionInfo());
|
||||
}
|
||||
|
||||
// We fetch workspace subscription info lazily as it's not needed in the first
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue