Apply initial forwards count from the message.
This commit is contained in:
		
							parent
							
								
									1b73b34810
								
							
						
					
					
						commit
						ccb3bbea15
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
					@ -92,6 +92,7 @@ struct HistoryItem::CreateConfig {
 | 
				
			||||||
	bool replyIsTopicPost = false;
 | 
						bool replyIsTopicPost = false;
 | 
				
			||||||
	UserId viaBotId = 0;
 | 
						UserId viaBotId = 0;
 | 
				
			||||||
	int viewsCount = -1;
 | 
						int viewsCount = -1;
 | 
				
			||||||
 | 
						int forwardsCount = -1;
 | 
				
			||||||
	QString author;
 | 
						QString author;
 | 
				
			||||||
	PeerId senderOriginal = 0;
 | 
						PeerId senderOriginal = 0;
 | 
				
			||||||
	QString senderNameOriginal;
 | 
						QString senderNameOriginal;
 | 
				
			||||||
| 
						 | 
					@ -2705,6 +2706,7 @@ void HistoryItem::createComponents(CreateConfig &&config) {
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							setForwardsCount(config.forwardsCount);
 | 
				
			||||||
		setReplies(std::move(config.replies));
 | 
							setReplies(std::move(config.replies));
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (const auto edited = Get<HistoryMessageEdited>()) {
 | 
						if (const auto edited = Get<HistoryMessageEdited>()) {
 | 
				
			||||||
| 
						 | 
					@ -2986,6 +2988,7 @@ void HistoryItem::createComponents(const MTPDmessage &data) {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	config.viaBotId = data.vvia_bot_id().value_or_empty();
 | 
						config.viaBotId = data.vvia_bot_id().value_or_empty();
 | 
				
			||||||
	config.viewsCount = data.vviews().value_or(-1);
 | 
						config.viewsCount = data.vviews().value_or(-1);
 | 
				
			||||||
 | 
						config.forwardsCount = data.vforwards().value_or(-1);
 | 
				
			||||||
	config.replies = isScheduled()
 | 
						config.replies = isScheduled()
 | 
				
			||||||
		? HistoryMessageRepliesData()
 | 
							? HistoryMessageRepliesData()
 | 
				
			||||||
		: HistoryMessageRepliesData(data.vreplies());
 | 
							: HistoryMessageRepliesData(data.vreplies());
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue