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());
}
void EmojiListWidget::showEmojiSection(Section section) {
showSet(EmojiSectionSetId(section));
}
void EmojiListWidget::refreshEmoji() {
refreshRecent();
refreshCustom();
@ -1723,8 +1719,6 @@ void EmojiListWidget::refreshEmoji() {
void EmojiListWidget::showSet(uint64 setId) {
clearSelection();
refreshEmoji();
auto y = 0;
enumerateSections([&](const SectionInfo &info) {
if (setId == sectionSetId(info.section)) {

View File

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

View File

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