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

Method reset

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

Source from the content-addressed store, hash-verified

1009}
1010
1011void ChatBackground::reset() {
1012 if (Data::details::IsTestingThemeWallPaper(_paper)
1013 || Data::details::IsTestingDefaultWallPaper(_paper)) {
1014 if (_themeImage.isNull()) {
1015 _paperForRevert = Data::DefaultWallPaper();
1016 _originalForRevert = QImage();
1017 _tileForRevert = false;
1018 } else {
1019 _paperForRevert = Data::ThemeWallPaper();
1020 _originalForRevert = _themeImage;
1021 _tileForRevert = _themeTile;
1022 }
1023 } else {
1024 set(Data::ThemeWallPaper());
1025 restoreAdjustableColors();
1026 _updates.fire({ BackgroundUpdate::Type::TestingTheme, tile() });
1027 _updates.fire({ BackgroundUpdate::Type::ApplyingTheme, tile() });
1028 }
1029 writeNewBackgroundSettings();
1030}
1031
1032bool ChatBackground::started() const {
1033 return !Data::details::IsUninitializedWallPaper(_paper);

Callers 9

showFinishedMethod · 0.45
SessionControllerMethod · 0.45
removeWidgetMethod · 0.45
resetGifAndCacheMethod · 0.45
validateGifAnimationMethod · 0.45
submitMethod · 0.45
showEmailInputMethod · 0.45
showAnimatedMethod · 0.45
verifyCodeMethod · 0.45

Calls 7

IsTestingThemeWallPaperFunction · 0.85
DefaultWallPaperFunction · 0.85
ThemeWallPaperFunction · 0.85
QImageClass · 0.50
isNullMethod · 0.45
fireMethod · 0.45

Tested by

no test coverage detected