refactor: ChatListView and enforce bootstrap
This commit is contained in:
parent
bdae763525
commit
75e11b0c54
2 changed files with 98 additions and 142 deletions
|
|
@ -154,6 +154,18 @@ class ChatListController extends State<ChatList> {
|
|||
@override
|
||||
void initState() {
|
||||
_initReceiveSharingIntent();
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
if (!Matrix.of(context).client.encryptionEnabled) return;
|
||||
final crossSigning = await crossSigningCachedFuture;
|
||||
final needsBootstrap =
|
||||
Matrix.of(context).client.encryption?.crossSigning?.enabled ==
|
||||
false ||
|
||||
crossSigning == false;
|
||||
final isUnknownSession = Matrix.of(context).client.isUnknownSession;
|
||||
if (needsBootstrap || isUnknownSession) {
|
||||
firstRunBootstrapAction();
|
||||
}
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue