https://bugs.kde.org/show_bug.cgi?id=102757
--- Comment #6 from Allen Winter <[email protected]> --- Git commit 4b1365ba5f08bd8a407a1d665893514b56ea7c19 by Allen Winter, on behalf of Malte Zilinski. Committed on 05/11/2026 at 13:06. Pushed by winterz into branch 'master'. messagelist: Make clickable status icons work in single-column themes Clicking the important, action item, spam/ham or watched/ignored icon of a message is meant to toggle that status without selecting the message (`Theme::ContentItem::IsClickable`, and the whole point of the "Smart with Clickable Status" theme, cf. bug 102757). `View::ViewPrivate::onPressed()` only handled such clicks when `selectedIndexes().count() > 1`. `selectedIndexes()` contains one index per *column*, so: | Theme | Selection | Before | After | |---|---|---|---| | multi-column (e.g. "Smart with Clickable Status", "Classic") | one or more rows | toggles | toggles (unchanged) | | multi-column | none | selects the message | toggles | | single-column (e.g. default "Smart") | zero or one row | selects the message | toggles | | single-column | several rows | toggles | toggles (unchanged) | The comment above the condition ("if we have multi selection then the meaning of hitting the content item is quite unclear") suggests the intent was the opposite of what the code does; I kept the existing behavior for multi-column themes and only added: content items that are clickable by type are always handled. Non-clickable items are unaffected. In particular, clicking the read-state envelope in the "Smart" theme still selects the message, so nobody's muscle memory changes. ### How to test 1. Pick the default "Smart" theme (View → Message List → Theme). 2. Mark a message as important, then select a *different* message. 3. Click the important icon of the first message. - Before: the first message gets selected (and possibly marked as read), importance unchanged. - After: importance is removed, selection stays on the second message. 4. Repeat with "Smart with Clickable Status" and no/one/several selected rows: behavior as in the table. Built against v26.08.2 (cherry-picked) and against master. Manually tested in KMail 26.08.2 with a single-column theme: clicking the important icon of a non-selected message toggles importance and keeps the current selection. No autotest: exercising `onPressed()` needs a populated `View`, and `Core::StorageModel`, `MessageItem` and `Manager` aren't exported (not even via `MESSAGELIST_TESTS_EXPORT`). Happy to add one if exporting them for tests is acceptable. M +4 -3 messagelist/src/core/view.cpp https://invent.kde.org/pim/messagelib/-/commit/4b1365ba5f08bd8a407a1d665893514b56ea7c19 -- You are receiving this mail because: You are watching all bug changes.
