Add top dropdown menu.

This commit is contained in:
John Preston
2023-12-05 17:25:26 +04:00
parent c46f34c677
commit 7755b70317
7 changed files with 78 additions and 2 deletions
+6
View File
@@ -39,6 +39,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "window/window_session_controller.h"
#include "window/window_session_controller_link_info.h"
#include <QtGui/QDesktopServices>
namespace Iv {
namespace {
@@ -186,6 +188,7 @@ Shown::Shown(
data->prepare({ .saveToFolder = base }, [=](Prepared result) {
result.hash = hash;
crl::on_main(weak, [=, result = std::move(result)]() mutable {
result.url = _id;
_embeds = std::move(result.embeds);
fillChannelJoinedValues(result);
if (!base.isEmpty()) {
@@ -790,6 +793,9 @@ void Instance::show(
case Type::JoinChannel:
processJoinChannel(event.context);
break;
case Type::OpenLinkExternal:
QDesktopServices::openUrl(event.url);
break;
case Type::OpenPage:
case Type::OpenLink:
_shownSession->api().request(MTPmessages_GetWebPage(