mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Start feeds support.
This commit is contained in:
@@ -12,6 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "data/data_peer_values.h"
|
||||
#include "data/data_channel_admins.h"
|
||||
#include "data/data_photo.h"
|
||||
#include "data/data_feed.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "observer_peer.h"
|
||||
#include "mainwidget.h"
|
||||
@@ -849,6 +850,26 @@ void ChannelData::setPinnedMessageId(MsgId messageId) {
|
||||
}
|
||||
}
|
||||
|
||||
void ChannelData::setFeed(not_null<Data::Feed*> feed) {
|
||||
setFeedPointer(feed);
|
||||
}
|
||||
|
||||
void ChannelData::clearFeed() {
|
||||
setFeedPointer(nullptr);
|
||||
}
|
||||
|
||||
void ChannelData::setFeedPointer(Data::Feed *feed) {
|
||||
if (_feed != feed) {
|
||||
if (_feed) {
|
||||
_feed->unregisterOne(this);
|
||||
}
|
||||
_feed = feed;
|
||||
if (_feed) {
|
||||
_feed->registerOne(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool ChannelData::canBanMembers() const {
|
||||
return (adminRights() & AdminRight::f_ban_users)
|
||||
|| amCreator();
|
||||
|
Reference in New Issue
Block a user