This commit is contained in:
Christien Rioux 2024-06-16 22:12:24 -04:00
parent 2ccad50f9a
commit 360ba436f8
29 changed files with 501 additions and 317 deletions

View file

@ -70,9 +70,6 @@ class _EditAccountPageState extends State<EditAccountPage> {
@override
Widget build(BuildContext context) {
final displayModalHUD = _isInAsyncCall;
final accountRecordsCubit = context.watch<AccountRecordsBlocMapCubit>();
final accountRecordCubit = accountRecordsCubit
.operate(widget.superIdentityRecordKey, closure: (c) => c);
return Scaffold(
// resizeToAvoidBottomInset: false,
@ -118,9 +115,15 @@ class _EditAccountPageState extends State<EditAccountPage> {
_isInAsyncCall = true;
});
try {
// Update account profile DHT record
// This triggers ConversationCubits to update
await accountRecordCubit.updateProfile(newProfile);
// Look up account cubit for this specific account
final accountRecordsCubit =
context.read<AccountRecordsBlocMapCubit>();
await accountRecordsCubit.operateAsync(
widget.superIdentityRecordKey, closure: (c) async {
// Update account profile DHT record
// This triggers ConversationCubits to update
await c.updateProfile(newProfile);
});
// Update local account profile
await AccountRepository.instance.editAccountProfile(