mirror of https://github.com/procxx/kepka.git
				
				
				
			Fix sending first message in chat.
This commit is contained in:
		
							parent
							
								
									8b766dda8e
								
							
						
					
					
						commit
						ab6d9ff73c
					
				|  | @ -2607,17 +2607,16 @@ void History::dialogEntryApplied() { | ||||||
| 		return; | 		return; | ||||||
| 	} | 	} | ||||||
| 	if (!chatListMessage()) { | 	if (!chatListMessage()) { | ||||||
|  | 		clear(ClearType::Unload); | ||||||
|  | 		addNewerSlice(QVector<MTPMessage>()); | ||||||
|  | 		addOlderSlice(QVector<MTPMessage>()); | ||||||
| 		if (const auto channel = peer->asChannel()) { | 		if (const auto channel = peer->asChannel()) { | ||||||
| 			const auto inviter = channel->inviter; | 			const auto inviter = channel->inviter; | ||||||
| 			if (inviter > 0 && channel->amIn()) { | 			if (inviter > 0 && channel->amIn()) { | ||||||
| 				if (const auto from = owner().userLoaded(inviter)) { | 				if (const auto from = owner().userLoaded(inviter)) { | ||||||
| 					clear(ClearType::Unload); |  | ||||||
| 					addNewerSlice(QVector<MTPMessage>()); |  | ||||||
| 					insertJoinedMessage(); | 					insertJoinedMessage(); | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 		} else { |  | ||||||
| 			clear(ClearType::DeleteChat); |  | ||||||
| 		} | 		} | ||||||
| 		return; | 		return; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue