Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assume layout changed unless proven otherwise #20163

Merged
merged 1 commit into from Oct 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions go/chat/storage/inbox.go
Expand Up @@ -867,7 +867,7 @@ func (i *Inbox) NewConversation(ctx context.Context, uid gregor1.UID, vers chat1
locks.Inbox.Lock()
defer locks.Inbox.Unlock()
defer i.maybeNukeFn(func() Error { return err }, i.dbKey(uid))
layoutChanged := false
layoutChanged := true
defer func() {
if layoutChanged {
i.layoutNotifier.UpdateLayout(ctx, "new conversation")
Expand Down Expand Up @@ -916,7 +916,7 @@ func (i *Inbox) NewConversation(ctx context.Context, uid gregor1.UID, vers chat1
}

// only chat convs for layout changed
layoutChanged = layoutChanged || conv.GetTopicType() == chat1.TopicType_CHAT
layoutChanged = conv.GetTopicType() == chat1.TopicType_CHAT
ibox.Conversations = append(utils.RemoteConvs([]chat1.Conversation{conv}), ibox.Conversations...)
} else {
i.Debug(ctx, "NewConversation: skipping update, conversation exists in inbox")
Expand Down