2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Add chat name / account name / unread count title settings.

This commit is contained in:
John Preston
2023-02-03 17:51:26 +04:00
parent eb64ffcd86
commit 94b489835c
13 changed files with 233 additions and 34 deletions

View File

@@ -170,6 +170,12 @@ Application::Application(not_null<Launcher*> launcher)
passcodeLockChanges(
) | rpl::start_with_next([=] {
_notifications->updateAll();
updateWindowTitles();
}, _lifetime);
settings().windowTitleContentChanges(
) | rpl::start_with_next([=] {
updateWindowTitles();
}, _lifetime);
_domain->activeSessionChanges(
@@ -1067,6 +1073,12 @@ void Application::preventOrInvoke(Fn<void()> &&callback) {
_lastActivePrimaryWindow->preventOrInvoke(std::move(callback));
}
void Application::updateWindowTitles() {
enumerateWindows([](not_null<Window::Controller*> window) {
window->widget()->updateTitle();
});
}
void Application::lockByPasscode() {
enumerateWindows([&](not_null<Window::Controller*> w) {
_passcodeLock = true;