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

Sort chat list on update #840

Merged
merged 1 commit into from
Jun 6, 2019
Merged

Sort chat list on update #840

merged 1 commit into from
Jun 6, 2019

Conversation

nicodh
Copy link
Member

@nicodh nicodh commented Jun 5, 2019

Update chat list when chat changes
Resolves #831

The chat list gets updated now on every DC_EVENT_CHAT_MODIFIED event.
Maybe we should test and check for more events which might not be handled...

Update chat list when chat changes
@nicodh nicodh requested review from Jikstra and ralphtheninja June 5, 2019 21:15
@@ -11,15 +11,19 @@ const chatListStore = new Store(defaultState)
// value for text1Meaning
const DC_TEXT1_DRAFT = 1

function sortChatList (first, second) {
return first.summary.timestamp > second.summary.timestamp ? -1 : 1
Copy link
Contributor

@Jikstra Jikstra Jun 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that sorting the chatlist isn't needed, instead we should have another array which just holds the chatIds in the correct order how we get it from the core. This way we can just refetch with one call. But I will try to implement that on top of this, first lets get this bug fixed.

@Jikstra Jikstra merged commit 474dbe6 into master Jun 6, 2019
@ralphtheninja ralphtheninja deleted the chatlist-refactoring-followup branch June 6, 2019 12:58
@ralphtheninja
Copy link
Member

A general nit pick: Please try to remember to clean up branches after merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New group not showing up directy. It's there after restart.
3 participants