mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Initialize list of blocked users on IgnoresPage construction (#4437)
The `SettingsPage::onShow` handler that sets up the block list is only called when the application settings dialog has already been shown once before. This caused the blocked user list to appear empty until the second time it was opened. Correct this by explicitly regenerating the block list in the constructor of `IgnoresPage`.
This commit is contained in:
parent
8048dcdd1f
commit
1fbbef34bf
|
@ -11,6 +11,8 @@
|
||||||
- Bugfix: Fixed an issue where context-menu items for zero-width emotes displayed the wrong provider. (#4460)
|
- Bugfix: Fixed an issue where context-menu items for zero-width emotes displayed the wrong provider. (#4460)
|
||||||
- Bugfix: Fixed an issue where the "Enable zero-width emotes" setting was showing the inverse state. (#4462)
|
- Bugfix: Fixed an issue where the "Enable zero-width emotes" setting was showing the inverse state. (#4462)
|
||||||
- Bugfix: Fixed username rendering in Qt 6. (#4476)
|
- Bugfix: Fixed username rendering in Qt 6. (#4476)
|
||||||
|
- Bugfix: Fixed blocked user list being empty when opening the settings dialog for the first time. (#4437)
|
||||||
|
- Bugfix: Fixed blocked user list sticking around when switching from a logged in user to being logged out. (#4437)
|
||||||
- Dev: Disabling precompiled headers on Windows is now tested in CI. (#4472)
|
- Dev: Disabling precompiled headers on Windows is now tested in CI. (#4472)
|
||||||
- Dev: Ignore unhandled BTTV user-events. (#4438)
|
- Dev: Ignore unhandled BTTV user-events. (#4438)
|
||||||
- Dev: Only log debug messages when NDEBUG is not defined. (#4442)
|
- Dev: Only log debug messages when NDEBUG is not defined. (#4442)
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
#include "IgnoresPage.hpp"
|
#include "widgets/settingspages/IgnoresPage.hpp"
|
||||||
|
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
#include "controllers/accounts/AccountController.hpp"
|
#include "controllers/accounts/AccountController.hpp"
|
||||||
#include "controllers/ignores/IgnoreController.hpp"
|
|
||||||
#include "controllers/ignores/IgnoreModel.hpp"
|
#include "controllers/ignores/IgnoreModel.hpp"
|
||||||
#include "controllers/ignores/IgnorePhrase.hpp"
|
#include "controllers/ignores/IgnorePhrase.hpp"
|
||||||
#include "providers/twitch/TwitchAccount.hpp"
|
#include "providers/twitch/TwitchAccount.hpp"
|
||||||
|
@ -39,6 +38,7 @@ IgnoresPage::IgnoresPage()
|
||||||
addPhrasesTab(tabs.appendTab(new QVBoxLayout, "Messages"));
|
addPhrasesTab(tabs.appendTab(new QVBoxLayout, "Messages"));
|
||||||
addUsersTab(*this, tabs.appendTab(new QVBoxLayout, "Users"),
|
addUsersTab(*this, tabs.appendTab(new QVBoxLayout, "Users"),
|
||||||
this->userListModel_);
|
this->userListModel_);
|
||||||
|
this->onShow();
|
||||||
}
|
}
|
||||||
|
|
||||||
void addPhrasesTab(LayoutCreator<QVBoxLayout> layout)
|
void addPhrasesTab(LayoutCreator<QVBoxLayout> layout)
|
||||||
|
@ -115,12 +115,13 @@ void addUsersTab(IgnoresPage &page, LayoutCreator<QVBoxLayout> users,
|
||||||
|
|
||||||
void IgnoresPage::onShow()
|
void IgnoresPage::onShow()
|
||||||
{
|
{
|
||||||
auto app = getApp();
|
auto *app = getApp();
|
||||||
|
|
||||||
auto user = app->accounts->twitch.getCurrent();
|
auto user = app->accounts->twitch.getCurrent();
|
||||||
|
|
||||||
if (user->isAnon())
|
if (user->isAnon())
|
||||||
{
|
{
|
||||||
|
this->userListModel_.setStringList({});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue