2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 14:08:41 +00:00

Fix scrolling of emoji categories.

This commit is contained in:
John Preston
2022-07-26 19:57:56 +03:00
parent 3c352cad40
commit a58c41be96
3 changed files with 2 additions and 8 deletions

View File

@@ -1711,10 +1711,6 @@ QPoint EmojiListWidget::buttonRippleTopLeft(int section) const {
: QPoint()); : QPoint());
} }
void EmojiListWidget::showEmojiSection(Section section) {
showSet(EmojiSectionSetId(section));
}
void EmojiListWidget::refreshEmoji() { void EmojiListWidget::refreshEmoji() {
refreshRecent(); refreshRecent();
refreshCustom(); refreshCustom();
@@ -1723,8 +1719,6 @@ void EmojiListWidget::refreshEmoji() {
void EmojiListWidget::showSet(uint64 setId) { void EmojiListWidget::showSet(uint64 setId) {
clearSelection(); clearSelection();
refreshEmoji();
auto y = 0; auto y = 0;
enumerateSections([&](const SectionInfo &info) { enumerateSections([&](const SectionInfo &info) {
if (setId == sectionSetId(info.section)) { if (setId == sectionSetId(info.section)) {

View File

@@ -68,7 +68,6 @@ public:
void clearSelection() override; void clearSelection() override;
object_ptr<TabbedSelector::InnerFooter> createFooter() override; object_ptr<TabbedSelector::InnerFooter> createFooter() override;
void showEmojiSection(Section section);
void showSet(uint64 setId); void showSet(uint64 setId);
[[nodiscard]] uint64 currentSet(int yOffset) const; [[nodiscard]] uint64 currentSet(int yOffset) const;

View File

@@ -819,7 +819,8 @@ void StickersListFooter::scrollByWheelEvent(
} }
}; };
const auto index = v::get<IconId>(_selected).index; const auto index = v::get<IconId>(_selected).index;
if (_icons[index].setId == AllEmojiSectionSetId()) { if (_subiconsExpanded
&& _icons[index].setId == AllEmojiSectionSetId()) {
use(_subiconState); use(_subiconState);
} else { } else {
use(_iconState); use(_iconState);