2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Move some settings from global to Session.

This commit is contained in:
John Preston
2019-08-02 11:40:35 +01:00
parent 7e4c9f98a6
commit 93a52bb66e
30 changed files with 315 additions and 169 deletions

View File

@@ -411,10 +411,6 @@ struct Data {
QByteArray DownloadPathBookmark;
base::Observable<void> DownloadPathChanged;
bool ReplaceEmoji = true;
bool SuggestEmoji = true;
bool SuggestStickersByEmoji = true;
base::Observable<void> ReplaceEmojiChanged;
bool VoiceMsgPlaybackDoubled = false;
bool SoundNotify = true;
bool DesktopNotify = true;
@@ -544,10 +540,6 @@ DefineVar(Global, QString, DownloadPath);
DefineVar(Global, QByteArray, DownloadPathBookmark);
DefineRefVar(Global, base::Observable<void>, DownloadPathChanged);
DefineVar(Global, bool, ReplaceEmoji);
DefineVar(Global, bool, SuggestEmoji);
DefineVar(Global, bool, SuggestStickersByEmoji);
DefineRefVar(Global, base::Observable<void>, ReplaceEmojiChanged);
DefineVar(Global, bool, VoiceMsgPlaybackDoubled);
DefineVar(Global, bool, SoundNotify);
DefineVar(Global, bool, DesktopNotify);
@@ -580,14 +572,4 @@ DefineVar(Global, int, CallOutputVolume);
DefineVar(Global, int, CallInputVolume);
DefineVar(Global, bool, CallAudioDuckingEnabled);
rpl::producer<bool> ReplaceEmojiValue() {
return rpl::single(
Global::ReplaceEmoji()
) | rpl::then(base::ObservableViewer(
Global::RefReplaceEmojiChanged()
) | rpl::map([] {
return Global::ReplaceEmoji();
}));
}
} // namespace Global