Refactor the EmotePopup file (#4239)
Flatten the anonymous namespace Make the `loadEmojis` functions static Make the `filterEmoteMap` function static Return an EmoteMap from `filterEmoteMap` instead of an EmoteMap* Other misc cool changes :-)
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "providers/emoji/Emojis.hpp"
|
||||
#include "providers/twitch/TwitchChannel.hpp"
|
||||
#include "widgets/BasePopup.hpp"
|
||||
#include "widgets/Notebook.hpp"
|
||||
@@ -22,7 +21,7 @@ public:
|
||||
|
||||
void loadChannel(ChannelPtr channel);
|
||||
|
||||
virtual void closeEvent(QCloseEvent *event) override;
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
|
||||
pajlada::Signals::Signal<Link> linkClicked;
|
||||
|
||||
@@ -43,13 +42,9 @@ private:
|
||||
QLineEdit *search_;
|
||||
Notebook *notebook_;
|
||||
|
||||
void loadEmojis(ChannelView &view, EmojiMap &emojiMap);
|
||||
void loadEmojis(Channel &channel, EmojiMap &emojiMap, const QString &title);
|
||||
void filterTwitchEmotes(std::shared_ptr<Channel> searchChannel,
|
||||
const QString &searchText);
|
||||
void filterEmotes(const QString &text);
|
||||
EmoteMap *filterEmoteMap(const QString &text,
|
||||
std::shared_ptr<const EmoteMap> emotes);
|
||||
void addShortcuts() override;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user