mirror of
https://github.com/vale981/tdesktop
synced 2025-03-05 17:51:41 -05:00
Preserve panels state through visibility toggles.
Emoji/Stickers/GIFs panel saves all the state between activations.
This commit is contained in:
parent
132d884600
commit
bf0f956325
4 changed files with 12 additions and 10 deletions
|
@ -75,7 +75,8 @@ EmojiListWidget::Footer::Footer(gsl::not_null<EmojiListWidget*> parent) : InnerF
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmojiListWidget::Footer::processPanelHideFinished() {
|
void EmojiListWidget::Footer::processPanelHideFinished() {
|
||||||
setCurrentSectionIcon(Section::Recent);
|
// Preserve panel state through visibility toggles.
|
||||||
|
//setCurrentSectionIcon(Section::Recent);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmojiListWidget::Footer::setCurrentSectionIcon(Section section) {
|
void EmojiListWidget::Footer::setCurrentSectionIcon(Section section) {
|
||||||
|
|
|
@ -116,7 +116,8 @@ void GifsListWidget::Footer::paintEvent(QPaintEvent *e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GifsListWidget::Footer::processPanelHideFinished() {
|
void GifsListWidget::Footer::processPanelHideFinished() {
|
||||||
_field->setText(QString());
|
// Preserve panel state through visibility toggles.
|
||||||
|
//_field->setText(QString());
|
||||||
}
|
}
|
||||||
|
|
||||||
GifsListWidget::GifsListWidget(QWidget *parent, gsl::not_null<Window::Controller*> controller) : Inner(parent, controller)
|
GifsListWidget::GifsListWidget(QWidget *parent, gsl::not_null<Window::Controller*> controller) : Inner(parent, controller)
|
||||||
|
@ -407,7 +408,8 @@ void GifsListWidget::processPanelHideFinished() {
|
||||||
result->forget();
|
result->forget();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
clearInlineRows(false);
|
// Preserve panel state through visibility toggles.
|
||||||
|
//clearInlineRows(false);
|
||||||
for_const (auto &item, _gifLayouts) {
|
for_const (auto &item, _gifLayouts) {
|
||||||
itemForget(item.second);
|
itemForget(item.second);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1009,11 +1009,12 @@ void StickersListWidget::processHideFinished() {
|
||||||
void StickersListWidget::processPanelHideFinished() {
|
void StickersListWidget::processPanelHideFinished() {
|
||||||
clearInstalledLocally();
|
clearInstalledLocally();
|
||||||
|
|
||||||
// Reset to the recent stickers section.
|
// Preserve panel state through visibility toggles.
|
||||||
if (_section == Section::Featured && (!_footer || !_footer->hasOnlyFeaturedSets())) {
|
//// Reset to the recent stickers section.
|
||||||
_section = Section::Stickers;
|
//if (_section == Section::Featured && (!_footer || !_footer->hasOnlyFeaturedSets())) {
|
||||||
validateSelectedIcon(ValidateIconAnimations::None);
|
// _section = Section::Stickers;
|
||||||
}
|
// validateSelectedIcon(ValidateIconAnimations::None);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StickersListWidget::refreshStickers() {
|
void StickersListWidget::refreshStickers() {
|
||||||
|
|
|
@ -461,8 +461,6 @@ void TabbedSelector::hideFinished() {
|
||||||
}
|
}
|
||||||
_a_slide.finish();
|
_a_slide.finish();
|
||||||
_slideAnimation.reset();
|
_slideAnimation.reset();
|
||||||
|
|
||||||
scrollToY(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabbedSelector::showStarted() {
|
void TabbedSelector::showStarted() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue