blob: 2a10b03da62c2c6fdac3493617a225c1c678cf4c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
//
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2026
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#pragma once
#include "td/telegram/StoryId.h"
#include "td/telegram/td_api.h"
#include "td/utils/common.h"
namespace td {
class ActiveStoryState {
StoryId max_active_story_id_;
StoryId max_read_story_id_;
bool has_live_story_ = false;
friend bool operator==(const ActiveStoryState &lhs, const ActiveStoryState &rhs);
bool has_unread_stories() const;
public:
ActiveStoryState(StoryId max_active_story_id, StoryId max_read_story_id, bool has_live_story)
: max_active_story_id_(max_active_story_id)
, max_read_story_id_(max_read_story_id)
, has_live_story_(has_live_story) {
}
td_api::object_ptr<td_api::ActiveStoryState> get_active_story_state_object() const;
};
bool operator==(const ActiveStoryState &lhs, const ActiveStoryState &rhs);
bool operator!=(const ActiveStoryState &lhs, const ActiveStoryState &rhs);
} // namespace td
|