Hide stickers by emoji when editing message.
This commit is contained in:
		
							parent
							
								
									46976c4e03
								
							
						
					
					
						commit
						becbad32c9
					
				
					 1 changed files with 12 additions and 5 deletions
				
			
		|  | @ -1136,8 +1136,10 @@ void HistoryWidget::updateStickersByEmoji() { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void HistoryWidget::onTextChange() { | void HistoryWidget::onTextChange() { | ||||||
| 	updateInlineBotQuery(); | 	InvokeQueued(this, [=] { | ||||||
| 	updateStickersByEmoji(); | 		updateInlineBotQuery(); | ||||||
|  | 		updateStickersByEmoji(); | ||||||
|  | 	}); | ||||||
| 
 | 
 | ||||||
| 	if (_history) { | 	if (_history) { | ||||||
| 		if (!_inlineBot | 		if (!_inlineBot | ||||||
|  | @ -1634,6 +1636,8 @@ void HistoryWidget::fastShowAtEnd(not_null<History*> history) { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void HistoryWidget::applyDraft(FieldHistoryAction fieldHistoryAction) { | void HistoryWidget::applyDraft(FieldHistoryAction fieldHistoryAction) { | ||||||
|  | 	InvokeQueued(this, [=] { updateStickersByEmoji(); }); | ||||||
|  | 
 | ||||||
| 	auto draft = _history ? _history->draft() : nullptr; | 	auto draft = _history ? _history->draft() : nullptr; | ||||||
| 	auto fieldAvailable = canWriteMessage(); | 	auto fieldAvailable = canWriteMessage(); | ||||||
| 	if (!draft || (!_history->editDraft() && !fieldAvailable)) { | 	if (!draft || (!_history->editDraft() && !fieldAvailable)) { | ||||||
|  | @ -6272,10 +6276,13 @@ void HistoryWidget::onCancel() { | ||||||
| 				lang(lng_cancel_edit_post_yes), | 				lang(lng_cancel_edit_post_yes), | ||||||
| 				lang(lng_cancel_edit_post_no), | 				lang(lng_cancel_edit_post_no), | ||||||
| 				base::lambda_guarded(this, [this] { | 				base::lambda_guarded(this, [this] { | ||||||
| 				onFieldBarCancel(); | 					if (_editMsgId) { | ||||||
| 			}))); | 						cancelEdit(); | ||||||
|  | 						Ui::hideLayer(); | ||||||
|  | 					} | ||||||
|  | 				}))); | ||||||
| 		} else { | 		} else { | ||||||
| 			onFieldBarCancel(); | 			cancelEdit(); | ||||||
| 		} | 		} | ||||||
| 	} else if (!_fieldAutocomplete->isHidden()) { | 	} else if (!_fieldAutocomplete->isHidden()) { | ||||||
| 		_fieldAutocomplete->hideAnimated(); | 		_fieldAutocomplete->hideAnimated(); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 John Preston
						John Preston