mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-11 08:48:14 +00:00
No shared media empty placeholders while loading.
This commit is contained in:
parent
4aae4f9399
commit
33ae4b176a
@ -92,7 +92,7 @@ std::unique_ptr<PeerListRow> ListController::createRow(
|
||||
}
|
||||
|
||||
void ListController::prepare() {
|
||||
setSearchNoResultsText(lang(lng_blocked_list_not_found));
|
||||
setSearchNoResultsText(lang(lng_bot_groups_not_found));
|
||||
delegate()->peerListSetSearchMode(PeerListSearchMode::Enabled);
|
||||
delegate()->peerListSetTitle(langFactory(lng_profile_common_groups_section));
|
||||
}
|
||||
|
@ -866,10 +866,12 @@ void WrapWidget::resizeEvent(QResizeEvent *e) {
|
||||
|
||||
void WrapWidget::keyPressEvent(QKeyEvent *e) {
|
||||
if (e->key() == Qt::Key_Escape) {
|
||||
showBackFromStack();
|
||||
} else {
|
||||
SectionWidget::keyPressEvent(e);
|
||||
if (hasStackHistory() || wrap() != Wrap::Layer) {
|
||||
showBackFromStack();
|
||||
return;
|
||||
}
|
||||
}
|
||||
SectionWidget::keyPressEvent(e);
|
||||
}
|
||||
|
||||
void WrapWidget::updateContentGeometry() {
|
||||
|
@ -2007,15 +2007,20 @@ void ListWidget::refreshHeight() {
|
||||
}
|
||||
|
||||
int ListWidget::recountHeight() {
|
||||
if (_sections.empty()) {
|
||||
if (auto count = _slice.fullCount()) {
|
||||
if (*count == 0) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
auto cachedPadding = padding();
|
||||
auto result = cachedPadding.top();
|
||||
for (auto §ion : _sections) {
|
||||
section.setTop(result);
|
||||
result += section.height();
|
||||
}
|
||||
return (result > cachedPadding.top())
|
||||
? (result + cachedPadding.bottom())
|
||||
: 0;
|
||||
return result + cachedPadding.bottom();
|
||||
}
|
||||
|
||||
void ListWidget::mouseActionUpdate() {
|
||||
|
Loading…
Reference in New Issue
Block a user