mirror of https://github.com/procxx/kepka.git
				
				
				
			Apply webpage media from sent message via bot.
This commit is contained in:
		
							parent
							
								
									00aa6d5ac3
								
							
						
					
					
						commit
						a285dca39e
					
				| 
						 | 
				
			
			@ -732,6 +732,8 @@ void HistoryMessage::refreshSentMedia(const MTPMessageMedia *media) {
 | 
			
		|||
	refreshMedia(media);
 | 
			
		||||
	if (wasGrouped) {
 | 
			
		||||
		Auth().data().groups().refreshMessage(this);
 | 
			
		||||
	} else {
 | 
			
		||||
		Auth().data().requestItemViewRefresh(this);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2235,7 +2235,9 @@ void HistoryWidget::destroyUnreadBar() {
 | 
			
		|||
	if (_migrated) _migrated->destroyUnreadBar();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void HistoryWidget::newUnreadMsg(History *history, HistoryItem *item) {
 | 
			
		||||
void HistoryWidget::newUnreadMsg(
 | 
			
		||||
		not_null<History*> history,
 | 
			
		||||
		not_null<HistoryItem*> item) {
 | 
			
		||||
	if (_history == history) {
 | 
			
		||||
		// If we get here in non-resized state we can't rely on results of
 | 
			
		||||
		// doWeReadServerHistory() and mark chat as read.
 | 
			
		||||
| 
						 | 
				
			
			@ -2256,7 +2258,11 @@ void HistoryWidget::newUnreadMsg(History *history, HistoryItem *item) {
 | 
			
		|||
		}
 | 
			
		||||
	}
 | 
			
		||||
	Auth().notifications().schedule(history, item);
 | 
			
		||||
	history->changeUnreadCount(1);
 | 
			
		||||
	if (history->unreadCountKnown()) {
 | 
			
		||||
		history->changeUnreadCount(1);
 | 
			
		||||
	} else {
 | 
			
		||||
		Auth().api().requestDialogEntry(history);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void HistoryWidget::historyToDown(History *history) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -201,7 +201,9 @@ public:
 | 
			
		|||
	void firstLoadMessages();
 | 
			
		||||
	void delayedShowAt(MsgId showAtMsgId);
 | 
			
		||||
 | 
			
		||||
	void newUnreadMsg(History *history, HistoryItem *item);
 | 
			
		||||
	void newUnreadMsg(
 | 
			
		||||
		not_null<History*> history,
 | 
			
		||||
		not_null<HistoryItem*> item);
 | 
			
		||||
	void historyToDown(History *history);
 | 
			
		||||
	void unreadCountChanged(not_null<History*> history);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2684,7 +2684,9 @@ void MainWidget::dialogsToUp() {
 | 
			
		|||
	_dialogs->dialogsToUp();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void MainWidget::newUnreadMsg(History *history, HistoryItem *item) {
 | 
			
		||||
void MainWidget::newUnreadMsg(
 | 
			
		||||
		not_null<History*> history,
 | 
			
		||||
		not_null<HistoryItem*> item) {
 | 
			
		||||
	_history->newUnreadMsg(history, item);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -125,7 +125,9 @@ public:
 | 
			
		|||
		const MTPUpdates &updates);
 | 
			
		||||
	void historyToDown(History *hist);
 | 
			
		||||
	void dialogsToUp();
 | 
			
		||||
	void newUnreadMsg(History *history, HistoryItem *item);
 | 
			
		||||
	void newUnreadMsg(
 | 
			
		||||
		not_null<History*> history,
 | 
			
		||||
		not_null<HistoryItem*> item);
 | 
			
		||||
	void markActiveHistoryAsRead();
 | 
			
		||||
 | 
			
		||||
	Dialogs::RowDescriptor chatListEntryBefore(
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue