Moved logic for displaying message preview data into common function, to reuse it in modal with subchannels list.
No logic changes has been made.
Details
Details
In web app, message previews in chat list should display exactly as before.
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
lib/hooks/message-preview.js | ||
---|---|---|
7–12 ↗ | (On Diff #10956) | We can probably merge these |
20 ↗ | (On Diff #10956) | We're not using hooks inside it, so maybe this can be a plain function instead of a hook? |
25–27 ↗ | (On Diff #10956) | We could introduce a different return type that represents no messages and use this in message-preview instead of checking if (!originalMessageInfo) {. This value can probably be just null. |
lib/hooks/message-preview.js | ||
---|---|---|
25–27 ↗ | (On Diff #10956) | What do you think about this idea? |
lib/hooks/message-preview.js | ||
---|---|---|
25–27 ↗ | (On Diff #10956) | I think the idea is no longer valid, as after changing the hook into function, I execute it conditionally and message info is always present. |