fix: Bootstrap hint
This commit is contained in:
parent
e0716f643c
commit
0c3612868d
6 changed files with 102 additions and 61 deletions
|
|
@ -174,12 +174,8 @@ class _ChatListState extends State<ChatList> {
|
|||
|
||||
final GlobalKey<DefaultAppBarSearchFieldState> _searchFieldKey = GlobalKey();
|
||||
|
||||
Future<List<ThirdPartyIdentifier>> _thirdPartyIdentifierFuture;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
_thirdPartyIdentifierFuture ??=
|
||||
Matrix.of(context).client.requestThirdPartyIdentifiers();
|
||||
return StreamBuilder<Object>(
|
||||
stream: Matrix.of(context).onShareContentChanged.stream,
|
||||
builder: (_, __) {
|
||||
|
|
|
|||
|
|
@ -140,12 +140,7 @@ class _ContactsState extends State<Contacts> {
|
|||
color: Colors.grey,
|
||||
),
|
||||
Center(
|
||||
child: RaisedButton(
|
||||
elevation: 7,
|
||||
color: Theme.of(context).scaffoldBackgroundColor,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
child: OutlinedButton(
|
||||
child: Text(
|
||||
L10n.of(context).inviteContact,
|
||||
style: TextStyle(
|
||||
|
|
|
|||
|
|
@ -378,6 +378,34 @@ class _SettingsState extends State<Settings> {
|
|||
.textTheme
|
||||
.headline6
|
||||
.color)),
|
||||
actions: [
|
||||
FutureBuilder(
|
||||
future: crossSigningCachedFuture,
|
||||
builder: (context, snapshot) {
|
||||
final needsBootstrap = Matrix.of(context)
|
||||
.client
|
||||
.encryption
|
||||
.crossSigning
|
||||
.enabled ==
|
||||
false ||
|
||||
snapshot.data == false;
|
||||
final isUnknownSession =
|
||||
Matrix.of(context).client.isUnknownSession;
|
||||
final displayHeader = needsBootstrap || isUnknownSession;
|
||||
if (!displayHeader) return Container();
|
||||
return TextButton.icon(
|
||||
icon: Icon(Icons.cloud, color: Colors.red),
|
||||
label: Text(
|
||||
L10n.of(context).chatBackup,
|
||||
style: TextStyle(color: Colors.red),
|
||||
),
|
||||
onPressed: () async {
|
||||
await BootstrapDialog().show(context);
|
||||
AdaptivePageLayout.of(context).popUntilIsFirst();
|
||||
},
|
||||
);
|
||||
}),
|
||||
],
|
||||
backgroundColor: Theme.of(context).appBarTheme.color,
|
||||
flexibleSpace: FlexibleSpaceBar(
|
||||
background: ContentBanner(profile?.avatarUrl,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue