try to fix problems with next unread msg

This commit is contained in:
Martin Rotter 2021-07-01 09:42:05 +02:00
parent ddf12ddf98
commit 441070f4f2
2 changed files with 6 additions and 5 deletions

View File

@ -30,7 +30,7 @@
<url type="donation">https://martinrotter.github.io/donate/</url>
<content_rating type="oars-1.1" />
<releases>
<release version="3.9.2" date="2021-06-30"/>
<release version="3.9.2" date="2021-07-01"/>
</releases>
<content_rating type="oars-1.0">
<content_attribute id="violence-cartoon">none</content_attribute>

View File

@ -581,10 +581,6 @@ void MessagesView::selectNextUnreadItem() {
if (next_unread.isValid()) {
// We found unread message, mark it.
setCurrentIndex(next_unread);
selectionModel()->select(next_unread,
QItemSelectionModel::SelectionFlag::ClearAndSelect |
QItemSelectionModel::SelectionFlag::Rows);
setFocus();
// Make sure that item is properly visible even if
// message previewer was hidden and shows up.
@ -594,6 +590,11 @@ void MessagesView::selectNextUnreadItem() {
!m_processingMouse && qApp->settings()->value(GROUP(Messages), SETTING(Messages::KeepCursorInCenter)).toBool()
? QAbstractItemView::ScrollHint::PositionAtCenter
: QAbstractItemView::ScrollHint::PositionAtTop);
selectionModel()->select(next_unread,
QItemSelectionModel::SelectionFlag::Select |
QItemSelectionModel::SelectionFlag::Rows);
setFocus();
}
}