2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 00:46:08 +00:00

Display top bar in archive.

This commit is contained in:
John Preston
2019-04-24 18:12:35 +04:00
parent f56df0e1d9
commit 52b9212625
10 changed files with 189 additions and 133 deletions

View File

@@ -275,9 +275,15 @@ void InnerWidget::changeOpenedFolder(Data::Folder *folder) {
return;
}
stopReorderPinned();
//const auto mouseSelection = _mouseSelection;
//const auto lastMousePosition = _lastMousePosition;
clearSelection();
_openedFolder = folder;
refresh();
// This doesn't work, because we clear selection in leaveEvent on hide.
//if (mouseSelection && lastMousePosition) {
// selectByMouse(*lastMousePosition);
//}
if (_loadMoreCallback) {
_loadMoreCallback();
}
@@ -730,8 +736,6 @@ void InnerWidget::paintSearchInSaved(
// paintSearchInFilter(p, paintUserpic, top, icon, text);
//}
//
void InnerWidget::activate() {
}
void InnerWidget::mouseMoveEvent(QMouseEvent *e) {
const auto globalPosition = e->globalPos();
@@ -1533,7 +1537,11 @@ void InnerWidget::clearSelection() {
updateSelectedRow();
_importantSwitchSelected = false;
_selected = nullptr;
_filteredSelected = _searchedSelected = _peerSearchSelected = _hashtagSelected = -1;
_filteredSelected
= _searchedSelected
= _peerSearchSelected
= _hashtagSelected
= -1;
setCursor(style::cur_default);
}
}
@@ -2389,18 +2397,7 @@ bool InnerWidget::chooseRow() {
if (IsServerMsgId(chosen.message.fullId.msg)) {
Local::saveRecentSearchHashtags(_filter);
}
updateSelectedRow();
_mouseSelection = false;
_lastMousePosition = std::nullopt;
_selected = nullptr;
_hashtagSelected
= _filteredSelected
= _peerSearchSelected
= _searchedSelected
= -1;
_chosenRow.fire_copy(chosen);
return true;
}
return false;