MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / keepApplied

Method keepApplied

Telegram/SourceFiles/window/themes/window_theme.cpp:1106–1131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1104}
1105
1106void ChatBackground::keepApplied(const Object &object, bool write) {
1107 setThemeObject(object);
1108 if (Data::details::IsTestingEditorWallPaper(_paper)) {
1109 setPaper(Data::CustomWallPaper());
1110 _themeImage = QImage();
1111 _themeTile = false;
1112 if (write) {
1113 writeNewBackgroundSettings();
1114 }
1115 } else if (Data::details::IsTestingThemeWallPaper(_paper)) {
1116 setPaper(Data::ThemeWallPaper());
1117 _themeImage = postprocessBackgroundImage(base::duplicate(_original));
1118 _themeTile = tile();
1119 if (write) {
1120 writeNewBackgroundSettings();
1121 }
1122 } else if (Data::details::IsTestingDefaultWallPaper(_paper)) {
1123 setPaper(Data::DefaultWallPaper());
1124 _themeImage = QImage();
1125 _themeTile = false;
1126 if (write) {
1127 writeNewBackgroundSettings();
1128 }
1129 }
1130 _updates.fire({ BackgroundUpdate::Type::ApplyingTheme, tile() });
1131}
1132
1133bool ChatBackground::isNonDefaultThemeOrBackground() {
1134 initialRead();

Callers 2

KeepAppliedFunction · 0.80
KeepFromEditorFunction · 0.80

Calls 8

IsTestingEditorWallPaperFunction · 0.85
CustomWallPaperFunction · 0.85
IsTestingThemeWallPaperFunction · 0.85
ThemeWallPaperFunction · 0.85
DefaultWallPaperFunction · 0.85
QImageClass · 0.50
fireMethod · 0.45

Tested by

no test coverage detected