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

Update API scheme on layer 148: Notifications.

Support editing / respect notification settings for topics.
This commit is contained in:
John Preston
2022-10-13 21:34:04 +04:00
parent b8bdca8921
commit d92580b8fc
47 changed files with 631 additions and 528 deletions

View File

@@ -41,7 +41,7 @@ class Forum;
const QString &title,
const style::ForumTopicIcon &st);
class ForumTopic final : public Data::Thread {
class ForumTopic final : public Thread {
public:
ForumTopic(not_null<Forum*> forum, MsgId rootId);
~ForumTopic();
@@ -59,7 +59,7 @@ public:
void setRealRootId(MsgId realId);
void applyTopic(const MTPForumTopic &topic);
void applyTopic(const MTPDforumTopic &data);
TimeId adjustedChatListTimeId() const override;
@@ -91,17 +91,17 @@ public:
void applyItemAdded(not_null<HistoryItem*> item);
void applyItemRemoved(MsgId id);
[[nodiscard]] Data::PeerNotifySettings &notify() {
[[nodiscard]] PeerNotifySettings &notify() {
return _notify;
}
[[nodiscard]] const Data::PeerNotifySettings &notify() const {
[[nodiscard]] const PeerNotifySettings &notify() const {
return _notify;
}
void loadUserpic() override;
void paintUserpic(
Painter &p,
std::shared_ptr<Data::CloudImageView> &view,
std::shared_ptr<CloudImageView> &view,
const Dialogs::Ui::PaintContext &context) const override;
[[nodiscard]] int unreadCount() const;
@@ -127,12 +127,12 @@ private:
int count,
bool known) const;
const not_null<Data::Forum*> _forum;
const not_null<Forum*> _forum;
const not_null<Dialogs::MainList*> _list;
std::shared_ptr<RepliesList> _replies;
MsgId _rootId = 0;
Data::PeerNotifySettings _notify;
PeerNotifySettings _notify;
QString _title;
DocumentId _iconId = 0;