Cleaned some stuff up and did some things
This commit is contained in:
@@ -23,7 +23,7 @@ void NotificationController::initialize(Settings &settings, Paths &paths)
|
||||
this->twitchSetting_.setValue(
|
||||
this->channelMap[Platform::Twitch].getVector());
|
||||
});
|
||||
|
||||
/*
|
||||
for (const QString &channelName : this->mixerSetting_.getValue()) {
|
||||
this->channelMap[Platform::Mixer].appendItem(channelName);
|
||||
}
|
||||
@@ -32,6 +32,7 @@ void NotificationController::initialize(Settings &settings, Paths &paths)
|
||||
this->mixerSetting_.setValue(
|
||||
this->channelMap[Platform::Mixer].getVector());
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
void NotificationController::updateChannelNotification(
|
||||
@@ -52,24 +53,6 @@ bool NotificationController::isChannelNotified(const QString &channelName,
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// for (std::vector<int>::size_type i = 0; i != channelMap[p])
|
||||
/*
|
||||
if (p == Platform::Twitch) {
|
||||
for (std::vector<int>::size_type i = 0;
|
||||
i != twitchVector.getVector().size(); i++) {
|
||||
if (twitchVector.getVector()[i].toLower() ==
|
||||
channelName.toLowercase()) { return true;
|
||||
}
|
||||
}
|
||||
} else if (p == Platform::Mixer) {
|
||||
for (std::vector<int>::size_type i = 0;
|
||||
i != mixerVector.getVector().size(); i++) {
|
||||
if (mixerVector.getVector()[i].toLower() ==
|
||||
channelName.toLowercase()) { return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -84,7 +67,7 @@ void NotificationController::removeChannelNotification(
|
||||
{
|
||||
for (std::vector<int>::size_type i = 0;
|
||||
i != channelMap[p].getVector().size(); i++) {
|
||||
if (channelMap[p].getVector()[i].toLower() == channelName) {
|
||||
if (channelMap[p].getVector()[i].toLower() == channelName.toLower()) {
|
||||
channelMap[p].removeItem(i);
|
||||
i--;
|
||||
}
|
||||
@@ -116,13 +99,6 @@ NotificationModel *NotificationController::createModel(QObject *parent,
|
||||
{
|
||||
NotificationModel *model = new NotificationModel(parent);
|
||||
model->init(&this->channelMap[p]);
|
||||
/*
|
||||
if (p == Platform::Twitch) {
|
||||
model->init(&this->twitchVector);
|
||||
} else if (p == Platform::Mixer) {
|
||||
model->init(&this->mixerVector);
|
||||
}
|
||||
*/
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,9 +11,8 @@ class Paths;
|
||||
class NotificationModel;
|
||||
|
||||
enum class Platform : uint8_t {
|
||||
Twitch = 0, // 0
|
||||
Mixer = 1, // 1
|
||||
HitBox = 2, // 2
|
||||
Twitch, // 0
|
||||
// Mixer, // 1
|
||||
};
|
||||
|
||||
class NotificationController final : public Singleton
|
||||
@@ -31,8 +30,6 @@ public:
|
||||
UnsortedSignalVector<QString> getVector(Platform p);
|
||||
|
||||
std::map<Platform, UnsortedSignalVector<QString>> channelMap;
|
||||
// UnsortedSignalVector<QString> twitchVector;
|
||||
// UnsortedSignalVector<QString> mixerVector;
|
||||
|
||||
NotificationModel *createModel(QObject *parent, Platform p);
|
||||
|
||||
@@ -40,8 +37,10 @@ private:
|
||||
bool initialized_ = false;
|
||||
ChatterinoSetting<std::vector<QString>> twitchSetting_ = {
|
||||
"/notifications/twitch"};
|
||||
/*
|
||||
ChatterinoSetting<std::vector<QString>> mixerSetting_ = {
|
||||
"/notifications/mixer"};
|
||||
*/
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
Reference in New Issue
Block a user