2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Added support of sound notification setting to Data::Session.

This commit is contained in:
23rd
2022-03-30 12:36:41 +03:00
committed by John Preston
parent 93d4581443
commit f32215f77d
6 changed files with 81 additions and 20 deletions

View File

@@ -666,14 +666,15 @@ public:
void updateNotifySettings(
not_null<PeerData*> peer,
std::optional<int> muteForSeconds,
std::optional<bool> silentPosts = std::nullopt);
std::optional<bool> silentPosts = std::nullopt,
std::optional<bool> soundIsNone = std::nullopt);
void resetNotifySettingsToDefault(not_null<PeerData*> peer);
bool notifyIsMuted(
not_null<const PeerData*> peer,
crl::time *changesIn = nullptr) const;
bool notifyIsMuted(not_null<const PeerData*> peer) const;
bool notifySilentPosts(not_null<const PeerData*> peer) const;
bool notifySoundIsNone(not_null<const PeerData*> peer) const;
bool notifyMuteUnknown(not_null<const PeerData*> peer) const;
bool notifySilentPostsUnknown(not_null<const PeerData*> peer) const;
bool notifySoundIsNoneUnknown(not_null<const PeerData*> peer) const;
bool notifySettingsUnknown(not_null<const PeerData*> peer) const;
rpl::producer<> defaultUserNotifyUpdates() const;
rpl::producer<> defaultChatNotifyUpdates() const;
@@ -711,6 +712,10 @@ public:
private:
using Messages = std::unordered_map<MsgId, not_null<HistoryItem*>>;
bool notifyIsMuted(
not_null<const PeerData*> peer,
crl::time *changesIn) const;
void suggestStartExport();
void setupMigrationViewer();