Implemented requested changes
changed setting from String to int. changed EnumCase I used createComboBox only has an implementation that handles stringsettings. I implemented my own combobox to handle the ToastsSettings now. Not sure if this is the best way. Won't come up with something smarter for now.
This commit is contained in:
@@ -8,10 +8,10 @@ namespace chatterino {
|
||||
enum class Platform : uint8_t;
|
||||
|
||||
enum class ToastReactions {
|
||||
openInBrowser,
|
||||
openInPlayer,
|
||||
openInStreamlink,
|
||||
dontOpen
|
||||
OpenInBrowser = 0,
|
||||
OpenInPlayer = 1,
|
||||
OpenInStreamlink = 2,
|
||||
DontOpen = 3
|
||||
};
|
||||
|
||||
class Toasts final : public Singleton
|
||||
@@ -19,6 +19,8 @@ class Toasts final : public Singleton
|
||||
public:
|
||||
void sendChannelNotification(const QString &channelName, Platform p);
|
||||
static QString findStringFromReaction(const ToastReactions &reaction);
|
||||
static QString findStringFromReaction(
|
||||
const pajlada::Settings::Setting<int> &reaction);
|
||||
static ToastReactions findReactionFromString(const QString &string);
|
||||
static std::map<ToastReactions, QString> reactionToString;
|
||||
static std::map<QString, ToastReactions> stringToReaction;
|
||||
|
||||
Reference in New Issue
Block a user