Fix whisper receiving

Added setting to display them inline under "Special Channels" page

Store a twitch users color in the TwitchUser struct
this is useful if we ever want to use the users own color.
The users own color is only updated once he has written once in chat

Add helper method for calling function only on normal channels

Fixes #54
This commit is contained in:
Rasmus Karlsson
2018-02-04 16:33:46 +01:00
parent f9a25171bf
commit 556dbe0456
8 changed files with 106 additions and 27 deletions
@@ -13,6 +13,7 @@ namespace settingspages {
SpecialChannelsPage::SpecialChannelsPage()
: SettingsPage("Special channels", "")
{
singletons::SettingManager &settings = singletons::SettingManager::getInstance();
util::LayoutCreator<SpecialChannelsPage> layoutCreator(this);
auto layout = layoutCreator.setLayoutType<QVBoxLayout>();
@@ -21,6 +22,12 @@ SpecialChannelsPage::SpecialChannelsPage()
mentions.emplace<QLabel>("Join /mentions to view your mentions.");
}
auto whispers = layout.emplace<QGroupBox>("Whispers").setLayoutType<QVBoxLayout>();
{
whispers.emplace<QLabel>("Join /whispers to view your mentions.");
whispers.append(this->createCheckBox("Show whispers inline", settings.inlineWhispers));
}
layout->addStretch(1);
}
} // namespace settingspages