mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-02 06:16:16 -04:00
cleanup
This commit is contained in:
parent
8c89ce91cf
commit
9dfb8c3f71
16 changed files with 305 additions and 162 deletions
|
@ -39,11 +39,11 @@ class _DrawerMenuState extends State<DrawerMenu> {
|
|||
});
|
||||
}
|
||||
|
||||
void _doEditClick(
|
||||
TypedKey superIdentityRecordKey, proto.Profile existingProfile) {
|
||||
void _doEditClick(TypedKey superIdentityRecordKey,
|
||||
proto.Profile existingProfile, OwnedDHTRecordPointer accountRecord) {
|
||||
singleFuture(this, () async {
|
||||
await GoRouterHelper(context).push('/edit_account',
|
||||
extra: [superIdentityRecordKey, existingProfile]);
|
||||
extra: [superIdentityRecordKey, existingProfile, accountRecord]);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -128,10 +128,10 @@ class _DrawerMenuState extends State<DrawerMenu> {
|
|||
final superIdentityRecordKey = la.superIdentity.recordKey;
|
||||
|
||||
// See if this account is logged in
|
||||
final avAccountRecordState = perAccountCollectionBlocMapState
|
||||
.get(superIdentityRecordKey)
|
||||
?.avAccountRecordState;
|
||||
if (avAccountRecordState != null) {
|
||||
final perAccountState =
|
||||
perAccountCollectionBlocMapState.get(superIdentityRecordKey);
|
||||
final avAccountRecordState = perAccountState?.avAccountRecordState;
|
||||
if (perAccountState != null && avAccountRecordState != null) {
|
||||
// Account is logged in
|
||||
final scale = theme.extension<ScaleScheme>()!.tertiaryScale;
|
||||
final loggedInAccount = avAccountRecordState.when(
|
||||
|
@ -144,7 +144,11 @@ class _DrawerMenuState extends State<DrawerMenu> {
|
|||
_doSwitchClick(superIdentityRecordKey);
|
||||
},
|
||||
footerCallback: () {
|
||||
_doEditClick(superIdentityRecordKey, value.profile);
|
||||
_doEditClick(
|
||||
superIdentityRecordKey,
|
||||
value.profile,
|
||||
perAccountState.accountInfo.userLogin!.accountRecordInfo
|
||||
.accountRecord);
|
||||
}),
|
||||
loading: () => _wrapInBox(
|
||||
child: buildProgressIndicator(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue