mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Update API scheme on layer 148.
Extract message history corner buttons code.
This commit is contained in:
@@ -22,7 +22,7 @@ namespace Data {
|
||||
|
||||
class Session;
|
||||
|
||||
class Folder final : public Dialogs::Entry, public base::has_weak_ptr {
|
||||
class Folder final : public Dialogs::Entry {
|
||||
public:
|
||||
static constexpr auto kId = 1;
|
||||
|
||||
|
@@ -239,6 +239,12 @@ void Forum::clearAllUnreadMentions() {
|
||||
}
|
||||
}
|
||||
|
||||
void Forum::clearAllUnreadReactions() {
|
||||
for (const auto &[rootId, topic] : _topics) {
|
||||
topic->unreadReactions().clear();
|
||||
}
|
||||
}
|
||||
|
||||
ForumTopic *Forum::topicFor(not_null<const HistoryItem*> item) {
|
||||
const auto maybe = topicFor(item->replyToTop());
|
||||
return maybe ? maybe : topicFor(item->topicRootId());
|
||||
|
@@ -60,6 +60,7 @@ public:
|
||||
void created(MsgId rootId, MsgId realId);
|
||||
|
||||
void clearAllUnreadMentions();
|
||||
void clearAllUnreadReactions();
|
||||
|
||||
private:
|
||||
struct TopicRequest {
|
||||
|
@@ -10,8 +10,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "data/data_sparse_ids.h"
|
||||
#include "storage/storage_sparse_ids_list.h"
|
||||
#include "storage/storage_shared_media.h"
|
||||
#include "base/value_ordering.h"
|
||||
#include "base/timer.h"
|
||||
#include "base/qt/qt_compare.h"
|
||||
|
||||
namespace Main {
|
||||
class Session;
|
||||
@@ -58,13 +58,9 @@ public:
|
||||
QString query;
|
||||
// from_id, min_date, max_date
|
||||
|
||||
friend inline auto value_ordering_helper(const Query &value) {
|
||||
return std::tie(
|
||||
value.peerId,
|
||||
value.migratedPeerId,
|
||||
value.type,
|
||||
value.query);
|
||||
}
|
||||
friend inline std::strong_ordering operator<=>(
|
||||
const Query &a,
|
||||
const Query &b) noexcept = default;
|
||||
|
||||
};
|
||||
struct SavedState {
|
||||
|
@@ -7,7 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "base/value_ordering.h"
|
||||
#include "ui/text/text.h" // For QFIXED_MAX
|
||||
#include "data/data_peer_id.h"
|
||||
#include "data/data_msg_id.h"
|
||||
@@ -84,9 +83,9 @@ struct MessageGroupId {
|
||||
return value;
|
||||
}
|
||||
|
||||
friend inline std::pair<uint64, uint64> value_ordering_helper(MessageGroupId value) {
|
||||
return std::make_pair(value.value, value.peer.value);
|
||||
}
|
||||
friend inline constexpr auto operator<=>(
|
||||
MessageGroupId,
|
||||
MessageGroupId) noexcept = default;
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user