mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fixed window title not containing the username on linux
This commit is contained in:
parent
d2de34914b
commit
7cd2d77524
|
@ -34,21 +34,21 @@ Window::Window(WindowType _type)
|
||||||
auto app = getApp();
|
auto app = getApp();
|
||||||
|
|
||||||
app->accounts->twitch.currentUserChanged.connect([this] {
|
app->accounts->twitch.currentUserChanged.connect([this] {
|
||||||
if (this->userLabel == nullptr) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto user = getApp()->accounts->twitch.getCurrent();
|
auto user = getApp()->accounts->twitch.getCurrent();
|
||||||
|
|
||||||
if (user->isAnon()) {
|
if (user->isAnon()) {
|
||||||
this->refreshWindowTitle("Not logged in");
|
this->refreshWindowTitle("Not logged in");
|
||||||
|
|
||||||
|
if (this->userLabel) {
|
||||||
this->userLabel->getLabel().setText("anonymous");
|
this->userLabel->getLabel().setText("anonymous");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this->refreshWindowTitle(user->getUserName());
|
this->refreshWindowTitle(user->getUserName());
|
||||||
|
|
||||||
|
if (this->userLabel) {
|
||||||
this->userLabel->getLabel().setText(user->getUserName());
|
this->userLabel->getLabel().setText(user->getUserName());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this->hasCustomWindowFrame() && _type == Window::Main) {
|
if (this->hasCustomWindowFrame() && _type == Window::Main) {
|
||||||
|
|
Loading…
Reference in a new issue