-
-
Notifications
You must be signed in to change notification settings - Fork 203
refactor: adapt to FullChat.contacts removal
#5527
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
base: main
Are you sure you want to change the base?
Conversation
|
The TODO doesn't sound like a blocker? The flicker only happens once when you open it, right? |
technically no, but I personally think that it is a big enough UX regression to investigate solutions. (I'm super annoyed by the flickering) |
packages/frontend/src/components/screens/MainScreen/MainScreen.tsx
Outdated
Show resolved
Hide resolved
|
seems like the flickering also breaks the e2e test |
I'll take a look. |
4f318ed to
6cf3a12
Compare
WofWca
left a comment
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.
I checked that the moved code hasn't changed.
packages/frontend/src/components/screens/MainScreen/MainScreen.tsx
Outdated
Show resolved
Hide resolved
|
|
||
| const firstChatContact = useRpcFetch(BackendRemote.rpc.getContact, [ | ||
| accountId, | ||
| chat.contactIds[0], |
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.
This could be undefined, which would result in an error. Behavior-wise it's OK, but it will spam the console:
deltachat-desktop/packages/frontend/src/hooks/useFetch.ts
Lines 141 to 153 in 1dbf369
| .catch(err => { | |
| if (!outdated) { | |
| setResultAndFetchId({ | |
| result: { ok: false, err }, | |
| fetchId, | |
| }) | |
| log.errorWithoutStackTrace( | |
| 'error while executing fetch', | |
| err, | |
| fetchId | |
| ) | |
| } | |
| }) |
An "ideal" solution would be to pass null instead of [accountId, contactId]touseRpcFetch`.
|
About the flicker: I'm not sure if "suspense" is really what we need. We know the number of contact beforehand, so why not just display placeholders in place of them? Or at least one div of height depending on the number of contacts.. |
….tsx Co-authored-by: WofWca <[email protected]>
FullChat.contacts removalFullChat.contacts removal

TODO
useRpcFetchwhere it makes sense -> especially for getting the first contact.depends on chatmail/core#7282