refactor: remove updateUserName from MenuUserBloc

This commit is contained in:
Ian Su 2022-07-09 23:32:29 +08:00
parent f24e154b4f
commit db165f7006

View File

@ -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;
}