No shared media empty placeholders while loading.

This commit is contained in:
John Preston 2017-11-17 20:20:31 +04:00
parent 4aae4f9399
commit 33ae4b176a
3 changed files with 14 additions and 7 deletions

View file

@ -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));
}

View file

@ -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() {

View file

@ -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 &section : _sections) {
section.setTop(result);
result += section.height();
}
return (result > cachedPadding.top())
? (result + cachedPadding.bottom())
: 0;
return result + cachedPadding.bottom();
}
void ListWidget::mouseActionUpdate() {