diff --git a/lib/views/contactsview.dart b/lib/views/contactsview.dart index 3acef72..cfd6cb9 100644 --- a/lib/views/contactsview.dart +++ b/lib/views/contactsview.dart @@ -85,7 +85,7 @@ class _ContactsViewState extends State { Widget _buildContactList() { final tiles = Provider.of(context).filteredList().map((ContactInfoState contact) { - return ChangeNotifierProvider.value(key: ValueKey(contact.onion), value: contact, builder: (_, __) => ContactRow()); + return ChangeNotifierProvider.value(key: ValueKey(contact.profileOnion+""+contact.onion), value: contact, builder: (_, __) => ContactRow()); }); final divided = ListTile.divideTiles( context: context, diff --git a/lib/views/messageview.dart b/lib/views/messageview.dart index 2e4e5a7..e3e81db 100644 --- a/lib/views/messageview.dart +++ b/lib/views/messageview.dart @@ -140,11 +140,7 @@ class _MessageViewState extends State { ), onPressed: _sendMessage, ))), - SizedBox( - width: 86, - height: 40, - child: IconButton(icon: Icon(Icons.insert_invitation, size: 12, color: Provider.of(context).theme.mainTextColor()), onPressed: () => _modalSendInvitation(context))), - ]) + ]) ], ), ); diff --git a/lib/widgets/contactrow.dart b/lib/widgets/contactrow.dart index 8a8ffe1..8211dc7 100644 --- a/lib/widgets/contactrow.dart +++ b/lib/widgets/contactrow.dart @@ -88,15 +88,17 @@ class _ContactRowState extends State { void _pushMessageView(String handle) { Provider.of(context, listen: false).contactList.getContact(handle).unreadMessages = 0; + var profileOnion = Provider.of(context, listen: false).onion; Navigator.of(context).push( MaterialPageRoute( builder: (BuildContext builderContext) { + var profile = Provider.of(builderContext, listen: false).profs.getProfile(profileOnion); return MultiProvider( providers: [ - ChangeNotifierProvider.value(value: Provider.of(context)), - ChangeNotifierProvider.value(value: Provider.of(context).contactList.getContact(handle)), + ChangeNotifierProvider.value(value: profile), + ChangeNotifierProvider.value(value: profile.contactList.getContact(handle)), ], - child: MessageView(), + builder:(context, child) => MessageView(), ); }, ), diff --git a/pubspec.lock b/pubspec.lock index 5f51869..8c01490 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -14,7 +14,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.6.0" + version: "2.6.1" boolean_selector: dependency: transitive description: