2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

When following a post link push reply-return.

Fixes #4856.
This commit is contained in:
John Preston
2018-07-09 21:13:48 +03:00
parent eb3eef4b80
commit b697824540
25 changed files with 136 additions and 74 deletions

View File

@@ -841,13 +841,13 @@ void Messenger::checkStartUrl() {
if (!cStartUrl().isEmpty() && !locked()) {
auto url = cStartUrl();
cSetStartUrl(QString());
if (!openLocalUrl(url)) {
if (!openLocalUrl(url, {})) {
cSetStartUrl(url);
}
}
}
bool Messenger::openLocalUrl(const QString &url) {
bool Messenger::openLocalUrl(const QString &url, QVariant context) {
auto urlTrimmed = url.trimmed();
if (urlTrimmed.size() > 8192) urlTrimmed = urlTrimmed.mid(0, 8192);
@@ -936,7 +936,12 @@ bool Messenger::openLocalUrl(const QString &url) {
startToken = gameParam;
post = ShowAtGameShareMsgId;
}
main->openPeerByName(domain, post, startToken);
const auto clickFromMessageId = context.value<FullMsgId>();
main->openPeerByName(
domain,
post,
startToken,
clickFromMessageId);
return true;
}
}