浏览代码

refactor: remove updateUserName from MenuUserBloc

Ian Su 2 年之前
父节点
当前提交
db165f7006
共有 1 个文件被更改,包括 0 次插入9 次删除
  1. 0 9
      frontend/app_flowy/lib/workspace/application/menu/menu_user_bloc.dart

+ 0 - 9
frontend/app_flowy/lib/workspace/application/menu/menu_user_bloc.dart

@@ -34,14 +34,6 @@ class MenuUserBloc extends Bloc<MenuUserEvent, MenuUserState> {
         didReceiveUserProfile: (UserProfile newUserProfile) {
           emit(state.copyWith(userProfile: newUserProfile));
         },
-        updateUserName: (String name) {
-          _userService.updateUserProfile(name: name).then((result) {
-            result.fold(
-              (l) => null,
-              (err) => Log.error(err),
-            );
-          });
-        },
       );
     });
   }
@@ -74,7 +66,6 @@ class MenuUserBloc extends Bloc<MenuUserEvent, MenuUserState> {
 class MenuUserEvent with _$MenuUserEvent {
   const factory MenuUserEvent.initial() = _Initial;
   const factory MenuUserEvent.fetchWorkspaces() = _FetchWorkspaces;
-  const factory MenuUserEvent.updateUserName(String name) = _UpdateUserName;
   const factory MenuUserEvent.didReceiveUserProfile(UserProfile newUserProfile) = _DidReceiveUserProfile;
 }