mirror of https://github.com/procxx/kepka.git
				
				
				
			
							parent
							
								
									ee0f66d746
								
							
						
					
					
						commit
						8b766dda8e
					
				|  | @ -263,7 +263,7 @@ InnerWidget::InnerWidget( | ||||||
| 	subscribe(session().data().queryItemVisibility(), [=]( | 	subscribe(session().data().queryItemVisibility(), [=]( | ||||||
| 			const Data::Session::ItemVisibilityQuery &query) { | 			const Data::Session::ItemVisibilityQuery &query) { | ||||||
| 		if (_history != query.item->history() | 		if (_history != query.item->history() | ||||||
| 			|| query.item->isHistoryEntry() | 			|| !query.item->isAdminLogEntry() | ||||||
| 			|| !isVisible()) { | 			|| !isVisible()) { | ||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
|  | @ -357,8 +357,7 @@ void HistoryItem::addLogEntryOriginal( | ||||||
| 		WebPageId localId, | 		WebPageId localId, | ||||||
| 		const QString &label, | 		const QString &label, | ||||||
| 		const TextWithEntities &content) { | 		const TextWithEntities &content) { | ||||||
| 	Expects(!isHistoryEntry()); | 	Expects(isAdminLogEntry()); | ||||||
| 	Expects(!isScheduled()); |  | ||||||
| 
 | 
 | ||||||
| 	AddComponents(HistoryMessageLogEntryOriginal::Bit()); | 	AddComponents(HistoryMessageLogEntryOriginal::Bit()); | ||||||
| 	Get<HistoryMessageLogEntryOriginal>()->page = _history->owner().webpage( | 	Get<HistoryMessageLogEntryOriginal>()->page = _history->owner().webpage( | ||||||
|  | @ -396,6 +395,10 @@ bool HistoryItem::isHistoryEntry() const { | ||||||
| 		|| (_clientFlags & MTPDmessage_ClientFlag::f_local_history_entry); | 		|| (_clientFlags & MTPDmessage_ClientFlag::f_local_history_entry); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | bool HistoryItem::isAdminLogEntry() const { | ||||||
|  | 	return (_clientFlags & MTPDmessage_ClientFlag::f_admin_log_entry); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| bool HistoryItem::isFromScheduled() const { | bool HistoryItem::isFromScheduled() const { | ||||||
| 	return isHistoryEntry() | 	return isHistoryEntry() | ||||||
| 		&& (_flags & MTPDmessage::Flag::f_from_scheduled); | 		&& (_flags & MTPDmessage::Flag::f_from_scheduled); | ||||||
|  | @ -403,6 +406,7 @@ bool HistoryItem::isFromScheduled() const { | ||||||
| 
 | 
 | ||||||
| bool HistoryItem::isScheduled() const { | bool HistoryItem::isScheduled() const { | ||||||
| 	return !isHistoryEntry() | 	return !isHistoryEntry() | ||||||
|  | 		&& !isAdminLogEntry() | ||||||
| 		&& (_flags & MTPDmessage::Flag::f_from_scheduled); | 		&& (_flags & MTPDmessage::Flag::f_from_scheduled); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -86,6 +86,7 @@ public: | ||||||
| 	[[nodiscard]] UserData *viaBot() const; | 	[[nodiscard]] UserData *viaBot() const; | ||||||
| 	[[nodiscard]] UserData *getMessageBot() const; | 	[[nodiscard]] UserData *getMessageBot() const; | ||||||
| 	[[nodiscard]] bool isHistoryEntry() const; | 	[[nodiscard]] bool isHistoryEntry() const; | ||||||
|  | 	[[nodiscard]] bool isAdminLogEntry() const; | ||||||
| 	[[nodiscard]] bool isFromScheduled() const; | 	[[nodiscard]] bool isFromScheduled() const; | ||||||
| 	[[nodiscard]] bool isScheduled() const; | 	[[nodiscard]] bool isScheduled() const; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -702,7 +702,7 @@ QMargins WebPage::inBubblePadding() const { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool WebPage::isLogEntryOriginal() const { | bool WebPage::isLogEntryOriginal() const { | ||||||
| 	return !_parent->data()->isHistoryEntry() && _parent->media() != this; | 	return _parent->data()->isAdminLogEntry() && _parent->media() != this; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int WebPage::bottomInfoPadding() const { | int WebPage::bottomInfoPadding() const { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue