aboutsummaryrefslogtreecommitdiffstats
path: root/src/requestinterceptor.h
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-26 19:19:55 +0200
committerDanilo M. <danix@danix.xyz>2026-08-26 19:19:55 +0200
commit1c034f6358f17c5c1d0eeaa04c42c33fac125d93 (patch)
tree6fc7e7b604f95d87c51c19d7a8cb932fa2840af4 /src/requestinterceptor.h
parent6ee94127510862139e89e8d653cd4994e27e5ffe (diff)
downloadqtmaildir-1c034f6358f17c5c1d0eeaa04c42c33fac125d93.tar.gz
qtmaildir-1c034f6358f17c5c1d0eeaa04c42c33fac125d93.zip
feat: resolve pending-change ids to subjects
Item 119, second half of the data: the step that turns the snapshot's ids into something worth showing. resolvePendingSubjects() takes the rows' ids in order, each flagged as a thread id or a message id, and answers positionally: one subject per input, plus the thread's message total for a thread id and -1 for a message id. Positional rather than set-based, and that is load-bearing. The caller has already decided what its rows are and in what order, and one id can legitimately appear on several rows: a message with two outstanding actions is two rows carrying one id. A combined query returns a set, which loses both the order and the duplicate, so the walk is one lookup per row instead. The cost is bounded by what the user did by hand since the last sync, which is not a query-sized number. A missing id answers with an EMPTY subject rather than being dropped. The dialog still shows that row, because the count the user clicked has to equal the list they are shown, and dropping a row breaks that agreement in exactly the case where the user is most likely to notice. An index that cannot be opened answers the same way, one empty subject per row, so the list still shows the changes with only the subjects missing. The thread count is taken at snapshot time and says so: a held thread edit applies when the sync ends, and a reply arriving in between makes the real number larger. The row describes what the user is looking at, not what the write will touch. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P88Q3MCSCSQxKDy7pmXh9F
Diffstat (limited to 'src/requestinterceptor.h')
0 files changed, 0 insertions, 0 deletions