forked from cwtch.im/cwtch-ui
Merge pull request 'Fix bugs in Invite Modal' (#504) from invite-fix into trunk
Reviewed-on: cwtch.im/cwtch-ui#504
This commit is contained in:
commit
9fb9759e6a
|
@ -625,6 +625,7 @@ class _MessageViewState extends State<MessageView> {
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(AppLocalizations.of(bcontext)!.invitationLabel),
|
Text(AppLocalizations.of(bcontext)!.invitationLabel),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
@ -633,10 +634,10 @@ class _MessageViewState extends State<MessageView> {
|
||||||
ChangeNotifierProvider.value(
|
ChangeNotifierProvider.value(
|
||||||
value: Provider.of<ProfileInfoState>(ctx, listen: false),
|
value: Provider.of<ProfileInfoState>(ctx, listen: false),
|
||||||
child: DropdownContacts(filter: (contact) {
|
child: DropdownContacts(filter: (contact) {
|
||||||
return contact.onion != Provider.of<ContactInfoState>(context).onion;
|
return contact.onion != Provider.of<ContactInfoState>(ctx).onion;
|
||||||
}, onChanged: (newVal) {
|
}, onChanged: (newVal) {
|
||||||
setState(() {
|
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(
|
SizedBox(
|
||||||
|
|
|
@ -250,7 +250,7 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
|
||||||
primary: Provider.of<Settings>(context).theme.backgroundMainColor,
|
primary: Provider.of<Settings>(context).theme.backgroundMainColor,
|
||||||
),
|
),
|
||||||
child:
|
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<Settings>(context).theme.mainTextColor, fontWeight: FontWeight.bold)),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
// 10GB profiles should be enough for anyone?
|
// 10GB profiles should be enough for anyone?
|
||||||
showFilePicker(context, MaxGeneralFileSharingSize, (file) {
|
showFilePicker(context, MaxGeneralFileSharingSize, (file) {
|
||||||
|
|
|
@ -29,6 +29,7 @@ class _DropdownContactsState extends State<DropdownContacts> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return DropdownButton(
|
return DropdownButton(
|
||||||
|
isExpanded: true, // magic property
|
||||||
value: this.selected,
|
value: this.selected,
|
||||||
items: Provider.of<ProfileInfoState>(context, listen: false).contactList.contacts.where(widget.filter).map<DropdownMenuItem<String>>((ContactInfoState contact) {
|
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));
|
return DropdownMenuItem<String>(value: contact.onion, child: Text(contact.nickname));
|
||||||
|
|
Loading…
Reference in New Issue