more refactor

This commit is contained in:
Christien Rioux 2024-01-25 20:33:56 -05:00
parent 0291ff7224
commit b35b618a4d
10 changed files with 162 additions and 152 deletions

View file

@ -7,7 +7,6 @@ import 'package:flutter_translate/flutter_translate.dart';
import 'package:go_router/go_router.dart';
import 'package:veilid_support/veilid_support.dart';
import '../../proto/proto.dart' as proto;
import '../account_manager/account_manager.dart';
import '../chat/chat.dart';
import '../theme/theme.dart';
@ -115,7 +114,7 @@ class HomePageState extends State<HomePage> with TickerProviderStateMixin {
}
final account = AccountRepository.instance
.getAccountInfo(accountMasterRecordKey: activeUserLogin);
.getAccountInfo(accountMasterRecordKey: activeUserLogin)!;
switch (account.status) {
case AccountInfoStatus.noAccount:
@ -152,7 +151,7 @@ class HomePageState extends State<HomePage> with TickerProviderStateMixin {
context,
localAccounts,
activeUserLogin,
account.accountRecord!,
account.activeAccountInfo!.accountRecord,
);
}
});

View file

@ -1,5 +1,3 @@
// ignore_for_file: prefer_const_constructors
import 'package:awesome_extensions/awesome_extensions.dart';
import 'package:fast_immutable_collections/fast_immutable_collections.dart';
import 'package:flutter/foundation.dart';
@ -58,6 +56,8 @@ class AccountPageState extends State<AccountPage> {
final textTheme = theme.textTheme;
final scale = theme.extension<ScaleScheme>()!;
final records = widget.account.contactInvitationRecords;
final contactInvitationRecordList =
ref.watch(fetchContactInvitationRecordsProvider).asData?.value ??
const IListConst([]);