Fix bugs in Invite Modal
continuous-integration/drone/pr Build is pending
Details
continuous-integration/drone/pr Build is pending
Details
This commit is contained in:
parent
d8cfb5c730
commit
da58555104
|
@ -625,6 +625,7 @@ class _MessageViewState extends State<MessageView> {
|
|||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: <Widget>[
|
||||
Text(AppLocalizations.of(bcontext)!.invitationLabel),
|
||||
SizedBox(
|
||||
|
@ -633,10 +634,10 @@ class _MessageViewState extends State<MessageView> {
|
|||
ChangeNotifierProvider.value(
|
||||
value: Provider.of<ProfileInfoState>(ctx, listen: false),
|
||||
child: DropdownContacts(filter: (contact) {
|
||||
return contact.onion != Provider.of<ContactInfoState>(context).onion;
|
||||
return contact.onion != Provider.of<ContactInfoState>(ctx).onion;
|
||||
}, onChanged: (newVal) {
|
||||
setState(() {
|
||||
this.selectedContact = Provider.of<ProfileInfoState>(context, listen: false).contactList.findContact(newVal)!.identifier;
|
||||
this.selectedContact = Provider.of<ProfileInfoState>(ctx, listen: false).contactList.findContact(newVal)!.identifier;
|
||||
});
|
||||
})),
|
||||
SizedBox(
|
||||
|
|
|
@ -29,6 +29,7 @@ class _DropdownContactsState extends State<DropdownContacts> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DropdownButton(
|
||||
isExpanded: true, // magic property
|
||||
value: this.selected,
|
||||
items: Provider.of<ProfileInfoState>(context, listen: false).contactList.contacts.where(widget.filter).map<DropdownMenuItem<String>>((ContactInfoState contact) {
|
||||
return DropdownMenuItem<String>(value: contact.onion, child: Text(contact.nickname));
|
||||
|
|
Loading…
Reference in New Issue