2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Support autostart in Windows Store version.

Fixes #3234.
This commit is contained in:
John Preston
2021-11-04 12:35:34 +04:00
parent 81327ede7b
commit f10ed4b9bc
17 changed files with 343 additions and 53 deletions

View File

@@ -22,6 +22,9 @@ inline bool AutostartSupported() {
return false;
}
inline void AutostartRequestStateFromSystem(Fn<void(bool)> callback) {
}
inline bool TrayIconSupported() {
return true;
}
@@ -50,7 +53,6 @@ inline void psCheckLocalSocket(const QString &serverName) {
void psActivateProcess(uint64 pid = 0);
QString psAppDataPath();
void psAutoStart(bool start, bool silent = false);
void psSendToMenu(bool send, bool silent = false);
int psCleanup();

View File

@@ -48,7 +48,7 @@ QString psAppDataPath() {
void psDoCleanup() {
try {
psAutoStart(false, true);
Platform::AutostartToggle(false);
psSendToMenu(false, true);
} catch (...) {
}
@@ -181,14 +181,19 @@ void IgnoreApplicationActivationRightNow() {
objc_ignoreApplicationActivationRightNow();
}
void AutostartToggle(bool enabled, Fn<void(bool)> done) {
done(false);
}
bool AutostartSkip() {
return !cAutoStart();
}
} // namespace Platform
void psNewVersion() {
}
void psAutoStart(bool start, bool silent) {
}
void psSendToMenu(bool send, bool silent) {
}