mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
ITextLink moved to ClickHandler, TextLinkPtr > ClickHandlerPtr.
Global methods textlnkOver/Down/DrawOver were replaced by static members of ClickHandler, now global state consists of the handler pointer + host pointer, who declares callbacks for the active and pressed handler changed events. This will allow to use ClickHandler from different hosts simultaneously (like HistoryItem / BotDescription / BotKeyboard). Not yet tested.
This commit is contained in:
@@ -1470,8 +1470,12 @@ void MainWidget::stopAnimActive() {
|
||||
history.stopAnimActive();
|
||||
}
|
||||
|
||||
void MainWidget::sendBotCommand(const QString &cmd, MsgId replyTo) {
|
||||
history.sendBotCommand(cmd, replyTo);
|
||||
void MainWidget::sendBotCommand(PeerData *peer, const QString &cmd, MsgId replyTo) {
|
||||
history.sendBotCommand(peer, cmd, replyTo);
|
||||
}
|
||||
|
||||
void MainWidget::sendBotCallback(PeerData *peer, const QString &cmd, MsgId replyTo) {
|
||||
history.sendBotCallback(peer, cmd, replyTo);
|
||||
}
|
||||
|
||||
bool MainWidget::insertBotCommand(const QString &cmd, bool specialGif) {
|
||||
@@ -2352,6 +2356,13 @@ void MainWidget::ui_showPeerHistory(quint64 peerId, qint32 showAtMsgId, bool bac
|
||||
App::wnd()->getTitle()->updateBackButton();
|
||||
}
|
||||
|
||||
PeerData *MainWidget::ui_getPeerForMouseAction() {
|
||||
if (profile) {
|
||||
return profile->ui_getPeerForMouseAction();
|
||||
}
|
||||
return history.ui_getPeerForMouseAction();
|
||||
}
|
||||
|
||||
void MainWidget::peerBefore(const PeerData *inPeer, MsgId inMsg, PeerData *&outPeer, MsgId &outMsg) {
|
||||
if (selectingPeer()) {
|
||||
outPeer = 0;
|
||||
|
Reference in New Issue
Block a user