GUI: Next/Previous mail actions should work from all contexts
commit8eba6b67637b2121228a4d5dfbc5b8284f8b3b58
authorJan Kundrát <jkt@kde.org>
Sat, 1 Oct 2016 00:09:06 +0000 (1 02:09 +0200)
committerJan Kundrát <jkt@kde.org>
Sat, 1 Oct 2016 00:14:18 +0000 (1 02:14 +0200)
treef914ab48b9b6544cf7afd478409c2b7a4934589c
parent43d1a71fed44b3a4603f6969d90b1155d600f665
GUI: Next/Previous mail actions should work from all contexts

v2: The QAction binding was correct, the bug was in our logic. When no
items were selected, the move would default to a no-op.

We are not going to the very first item in a mailbox because doing that
might be a bit counter-intuitive on huge mailboxes. This patch will
resume the navigation at the top of the current view, depending on where
the user scrolled the viewport. Chances are that this is going to be
near the desired position.

Thanks to Sérgio Martins for reporting this.

Change-Id: I89fde26bbd5ff4ae445410eff0d22f39ca996ee1
src/Gui/Window.cpp