Skip to content
Commit dd6c9376 authored by Jan Kundrát's avatar Jan Kundrát
Browse files

GUI: Inhibit auto-mark-read after toggling the state manually

The point of this patch is to make sure that a quick press of "M" immediately
after hitting the up/down arrow key will abort the delayed "let's make current
message as read" feature.

This stuff has to be done in a slightly complicated way due to way how shortcuts
are implemented in Qt. The shortcut receives the key information *prior* to the
target widget's keyReleaseEvent; the keyPressEvent is actually eaten by the
QAction's shortcut handler.

However, we can still listen to the QEvent::ShortcutOverride which is processed
prior to QAction. This patch therefore configures the widget so that if it
detects that any other key than those in the "delay any action for these" group
has been pressed, the delay is immediately cut and the action is performed.

On top of that, the actual inhibition of the auto-mark-as-read timer can be
trivially implemented. The ihibiting is only active when the "current message"
as defined by the listing matches the "current message" as defined by the
message viewer.

REVIEW: 113669
parent f8e478b0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment