-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
Rework Forward Message Dialog, Chatlist and implement async lazy loading chatlist... #997
Conversation
Jikstra
commented
Sep 19, 2019
•
edited
Loading
edited
- Implement add contact over chat search (Fixes chatList.js:57 Uncaught TypeError: Cannot read property 'state' of null at EventEmitter.module.exports../src/renderer/stores/chatList.js.ipcRenderer.on (chatList.js:57) at EventEmitter.emit (events.js:187) #917)
- Implement lazy loading chatlist which only fetches what's in view
- Removes chatlist store (Fixes Search should only search non archived #396)
- Improves chatlist styling
- Use lazy loading chatlist in forward message dialog and tweak styling of that dialog
- Start moving from styled components to sass (thanks @Simon-Laux & @nicodh for pushing this, was a long trip for me to change my mind :D)
- Make settings dialog the same width as CreateChat/ForwardMessage dialog
- Refactored everything that was in my way
- Restyle & refactor MessageDetail dialog
- Fix Displayed wrong message in Import secret keys implementation #951, changes import secret keys file import title
- use a better and more fitting danger color - the 'bad' option can now be chosen with the yesIsDanger prop, and the danger option is always on the left side and in the red danger color - Make overlay opacity more prominent
- Add dialoger header border line to AddGroup Main dialog - Dont show initals
- Give create chat/group dialog a fixed height
forwarding message
Make ChatList a functional component
Fix get_draft
b543b7e
to
9cde0e8
Compare
Fix select chat
Fix context menu in chatlist
// Don't update if a draft changes | ||
if (msgId === 0) return | ||
this.onChatListChanged() | ||
this.onChatListItemChanged(chatId) | ||
this.onMessageUpdate(chatId, msgId, 'DC_EVENT_MSGS_CHANGED') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicodh the reason why we call onChatListChanged and onChatListItemChanged is because onChatListChanged triggers a refetch of the chatlist, which would result in a resorting of the displayed chatlists. The useLazyChatListItems hook only tries to fetch chats in view after chatListIds changed, but doesn't force refetch them (this is needed for search, where only the sort/which ids are shown changes but we don't want to refetch all chats). And this is where onChatListItemChanged comes into play, because if called with chatId=0, it force refetches all chats in view. It probably makes sense to split this into two events, onChatListItemChanged onChatListForceUpdateInView or something like this.
padding of no search result pseudo item in Member search
Compliance department says YOLO |