Quick fix for 'Cant forward here' error.
This commit is contained in:
		
							parent
							
								
									b814c6307a
								
							
						
					
					
						commit
						7316d24ca4
					
				
					 1 changed files with 12 additions and 8 deletions
				
			
		|  | @ -2858,6 +2858,7 @@ void HistoryWidget::send(bool silent, Qt::KeyboardModifiers modifiers) { | ||||||
| 	message.silent = silent; | 	message.silent = silent; | ||||||
| 	message.handleSupportSwitch = Support::HandleSwitch(modifiers); | 	message.handleSupportSwitch = Support::HandleSwitch(modifiers); | ||||||
| 
 | 
 | ||||||
|  | 	if (_canSendMessages) { | ||||||
| 		const auto error = GetErrorTextForForward( | 		const auto error = GetErrorTextForForward( | ||||||
| 			_peer, | 			_peer, | ||||||
| 			_toForward, | 			_toForward, | ||||||
|  | @ -2866,6 +2867,7 @@ void HistoryWidget::send(bool silent, Qt::KeyboardModifiers modifiers) { | ||||||
| 			ShowErrorToast(error); | 			ShowErrorToast(error); | ||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| 	session().api().sendMessage(std::move(message)); | 	session().api().sendMessage(std::move(message)); | ||||||
| 
 | 
 | ||||||
|  | @ -5280,8 +5282,10 @@ void HistoryWidget::keyPressEvent(QKeyEvent *e) { | ||||||
| 			const auto submitting = Ui::InputField::ShouldSubmit( | 			const auto submitting = Ui::InputField::ShouldSubmit( | ||||||
| 				session().settings().sendSubmitWay(), | 				session().settings().sendSubmitWay(), | ||||||
| 				e->modifiers()); | 				e->modifiers()); | ||||||
|  | 			if (submitting) { | ||||||
| 				send(false, e->modifiers()); | 				send(false, e->modifiers()); | ||||||
| 			} | 			} | ||||||
|  | 		} | ||||||
| 	} else if (e->key() == Qt::Key_O && e->modifiers() == Qt::ControlModifier) { | 	} else if (e->key() == Qt::Key_O && e->modifiers() == Qt::ControlModifier) { | ||||||
| 		chooseAttach(); | 		chooseAttach(); | ||||||
| 	} else { | 	} else { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 John Preston
						John Preston