mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 15:13:57 +02:00
fix: forum link
This commit is contained in:
parent
25821ba338
commit
57aebdd300
2 changed files with 7 additions and 6 deletions
|
@ -25,6 +25,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include <QtGui/QGuiApplication>
|
#include <QtGui/QGuiApplication>
|
||||||
#include <QtGui/QClipboard>
|
#include <QtGui/QClipboard>
|
||||||
|
|
||||||
|
#include "window/window_controller.h"
|
||||||
#include "window/window_session_controller.h"
|
#include "window/window_session_controller.h"
|
||||||
#include "window/window_session_controller_link_info.h"
|
#include "window/window_session_controller_link_info.h"
|
||||||
|
|
||||||
|
@ -46,7 +47,7 @@ rpl::producer<TextWithEntities> Text() {
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
AboutBox::AboutBox(QWidget *parent, not_null<Window::SessionController*> controller)
|
AboutBox::AboutBox(QWidget *parent, Window::SessionController* controller)
|
||||||
: _version(this, tr::lng_about_version(tr::now, lt_version, currentVersionText()), st::aboutVersionLink)
|
: _version(this, tr::lng_about_version(tr::now, lt_version, currentVersionText()), st::aboutVersionLink)
|
||||||
, _text(this, Text(), st::aboutLabel)
|
, _text(this, Text(), st::aboutLabel)
|
||||||
, _controller(controller) {
|
, _controller(controller) {
|
||||||
|
@ -58,12 +59,12 @@ void AboutBox::prepare() {
|
||||||
addButton(tr::lng_close(), [this] { closeBox(); });
|
addButton(tr::lng_close(), [this] { closeBox(); });
|
||||||
addLeftButton(
|
addLeftButton(
|
||||||
rpl::single(QString("@ayugramchat")),
|
rpl::single(QString("@ayugramchat")),
|
||||||
[=]
|
[this, controller = _controller]
|
||||||
{
|
{
|
||||||
_controller->showPeerByLink(Window::PeerByLinkInfo{
|
closeBox();
|
||||||
|
controller->showPeerByLink(Window::PeerByLinkInfo{
|
||||||
.usernameOrId = QString("ayugramchat"),
|
.usernameOrId = QString("ayugramchat"),
|
||||||
});
|
});
|
||||||
closeBox();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
_text->setLinksTrusted();
|
_text->setLinksTrusted();
|
||||||
|
|
|
@ -20,7 +20,7 @@ class FlatLabel;
|
||||||
|
|
||||||
class AboutBox : public Ui::BoxContent {
|
class AboutBox : public Ui::BoxContent {
|
||||||
public:
|
public:
|
||||||
AboutBox(QWidget*, not_null<Window::SessionController*> controller);
|
AboutBox(QWidget*, Window::SessionController* controller);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void prepare() override;
|
void prepare() override;
|
||||||
|
@ -33,7 +33,7 @@ private:
|
||||||
|
|
||||||
object_ptr<Ui::LinkButton> _version;
|
object_ptr<Ui::LinkButton> _version;
|
||||||
object_ptr<Ui::FlatLabel> _text;
|
object_ptr<Ui::FlatLabel> _text;
|
||||||
not_null<Window::SessionController*> _controller;
|
Window::SessionController* _controller;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue