Check if a message should be counted in replies count and generate appropriate updates.
https://linear.app/comm/issue/ENG-8892/handle-replies-count-as-a-part-of-dmoperationspecs
Depends on D12881
Differential D12921
[lib] Handle replies count tomek on Jul 29 2024, 8:43 AM. Authored by Tags None Referenced Files
Subscribers
Details
Check if a message should be counted in replies count and generate appropriate updates. https://linear.app/comm/issue/ENG-8892/handle-replies-count-as-a-part-of-dmoperationspecs Depends on D12881 Just the Flow. Further testing will be performed after it is connected with the rest of the app.
Diff Detail
Event TimelineComment Actions This is a little messy. Curious about @inka's suggestion. If there's some specific information needed from processDMOperation, I'd consider returning that explicitly, and handling it from the caller – it would improve readability, and simplify the logic in the specs Comment Actions Agree that it would be a lot better to extract the logic from the specs. I'm going to think about it more but at this point, it seems hard because:
There are some possible ideas, e.g.
Each of these could be complicated, and it seems they mostly move complexity from one place to another. Comment Actions Discussed something similar for updating unread status here.
This is true, but we could implement a utility that handles it. I don't think it would be that complicated.
Perhaps mergeUpdatesWithMessageInfos could be helpful here?
Ultimately my goal would be to unify the complexity in one place, so we can mitigate the risk of the programmer forgetting to handle it in a specific case, and so we could reduce code duplication. Comment Actions Makes sense! Created https://linear.app/comm/issue/ENG-8930/unify-the-approach-to-replies-count-and-unread-status-updates to track. |