From da58555104f97340d748eb2e1f201e4799ab69a9 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Mon, 4 Jul 2022 14:32:53 -0700 Subject: [PATCH 1/2] Fix bugs in Invite Modal --- lib/views/messageview.dart | 5 +++-- lib/widgets/DropdownContacts.dart | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/views/messageview.dart b/lib/views/messageview.dart index b2d616f5..c548e348 100644 --- a/lib/views/messageview.dart +++ b/lib/views/messageview.dart @@ -625,6 +625,7 @@ class _MessageViewState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.center, mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.stretch, children: [ Text(AppLocalizations.of(bcontext)!.invitationLabel), SizedBox( @@ -633,10 +634,10 @@ class _MessageViewState extends State { ChangeNotifierProvider.value( value: Provider.of(ctx, listen: false), child: DropdownContacts(filter: (contact) { - return contact.onion != Provider.of(context).onion; + return contact.onion != Provider.of(ctx).onion; }, onChanged: (newVal) { setState(() { - this.selectedContact = Provider.of(context, listen: false).contactList.findContact(newVal)!.identifier; + this.selectedContact = Provider.of(ctx, listen: false).contactList.findContact(newVal)!.identifier; }); })), SizedBox( diff --git a/lib/widgets/DropdownContacts.dart b/lib/widgets/DropdownContacts.dart index 2247f9b4..ddac1a6e 100644 --- a/lib/widgets/DropdownContacts.dart +++ b/lib/widgets/DropdownContacts.dart @@ -29,6 +29,7 @@ class _DropdownContactsState extends State { @override Widget build(BuildContext context) { return DropdownButton( + isExpanded: true, // magic property value: this.selected, items: Provider.of(context, listen: false).contactList.contacts.where(widget.filter).map>((ContactInfoState contact) { return DropdownMenuItem(value: contact.onion, child: Text(contact.nickname)); From 62b87f29392a9074547834b105b1b02c070d195d Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Mon, 4 Jul 2022 14:39:58 -0700 Subject: [PATCH 2/2] Fix #498 --- lib/views/profilemgrview.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/views/profilemgrview.dart b/lib/views/profilemgrview.dart index 38f1fc87..0c277207 100644 --- a/lib/views/profilemgrview.dart +++ b/lib/views/profilemgrview.dart @@ -250,7 +250,7 @@ class _ProfileMgrViewState extends State { primary: Provider.of(context).theme.backgroundMainColor, ), child: - Text(AppLocalizations.of(context)!.importProfile, semanticsLabel: AppLocalizations.of(context)!.importProfile, style: TextStyle(fontWeight: FontWeight.bold)), + Text(AppLocalizations.of(context)!.importProfile, semanticsLabel: AppLocalizations.of(context)!.importProfile, style: TextStyle(color: Provider.of(context).theme.mainTextColor, fontWeight: FontWeight.bold)), onPressed: () { // 10GB profiles should be enough for anyone? showFilePicker(context, MaxGeneralFileSharingSize, (file) {