Skip to content
Snippets Groups Projects
Commit 324ba15b authored by Jono Wenger's avatar Jono Wenger
Browse files

Make chats show up when a connection is made and not when the initial message is received

parent d5e85769
No related branches found
No related tags found
No related merge requests found
...@@ -59,7 +59,7 @@ func runTestUI() { ...@@ -59,7 +59,7 @@ func runTestUI() {
l1.Hear(receive.Message{ l1.Hear(receive.Message{
MessageType: 1, MessageType: 1,
ID: cryptoE2e.MessageID{}, ID: cryptoE2e.MessageID{},
Payload: []byte("My name is Sally. 1 abortion please!"), Payload: []byte("Hello this is a test."),
Sender: partnerID, Sender: partnerID,
RecipientID: myID, RecipientID: myID,
Timestamp: netTime.Now(), Timestamp: netTime.Now(),
......
...@@ -56,6 +56,9 @@ func (cs *Chats) Add(receivedMsgChan chan []byte, sendFn SendMessage, ...@@ -56,6 +56,9 @@ func (cs *Chats) Add(receivedMsgChan chan []byte, sendFn SendMessage,
maxMessageLen: maxMessageLen, maxMessageLen: maxMessageLen,
unread: true, unread: true,
} }
cs.updateFeed <- struct{}{}
go cs.UpdateChatList(cs.nextIndex)
go cs.chats[cs.nextIndex].updateChatFeed(cs.updateFeed, cs.UpdateChatList) go cs.chats[cs.nextIndex].updateChatFeed(cs.updateFeed, cs.UpdateChatList)
cs.nextIndex++ cs.nextIndex++
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment