This commit is contained in:
erinn 2021-02-10 14:04:07 -08:00
parent 9978aa13b5
commit b7e2d91faf
2 changed files with 4 additions and 2 deletions

View File

@ -87,6 +87,8 @@ class ContactListState extends ChangeNotifier {
ContactListState(Cwtch cwtch, String profileOnion) {
cwtch.GetContacts(profileOnion).then((jsonStr) {
if (jsonStr == null) return;
print("contacts: " + jsonStr);
List<dynamic> contacts = jsonDecode(jsonStr);
contacts.forEach((c) {

View File

@ -35,7 +35,7 @@ class _MessageListState extends State<MessageList> {
itemCount: conversationNumMessages,
itemBuilder: (context, index) {
return MessageBubble(
profile: widget.profile,
profile: Provider.of<ProfileInfoState>(context),
contactOnion: widget.conversationHandle,
messageIndex: index,
);
@ -50,7 +50,7 @@ class _MessageListState extends State<MessageList> {
return;
}
Provider.of<FlwtchState>(context, listen: false).cwtch.NumMessages(widget.profile.onion, widget.conversationHandle).then((n) {
Provider.of<FlwtchState>(context, listen: false).cwtch.NumMessages(Provider.of<ProfileInfoState>(context).onion, widget.conversationHandle).then((n) {
if (n != conversationNumMessages) setState(() => conversationNumMessages = n);
});
}