tdesktop/Telegram/SourceFiles/data/data_feed.cpp

39 lines
881 B
C++
Raw Normal View History

2018-01-04 09:40:58 +00:00
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "data/data_feed.h"
namespace Data {
Feed::Feed(FeedId id) : _id(id) {
}
void Feed::registerOne(not_null<ChannelData*> channel) {
_channels.emplace(channel);
}
void Feed::unregisterOne(not_null<ChannelData*> channel) {
_channels.remove(channel);
}
void Feed::setUnreadCounts(int unreadCount, int unreadMutedCount) {
_unreadCount = unreadCount;
_unreadMutedCount = unreadMutedCount;
}
void Feed::cachePinnedIndex(int index) {
_pinnedIndex = index;
}
uint64 Feed::sortKeyInChatList() const {
return 0ULL;/* isPinnedDialog()
? pinnedDialogPos(_pinnedIndex)
: dialogPosFromDate(chatListDate());*/
}
2018-01-04 09:40:58 +00:00
} // namespace Data