mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Updated TDesktop sources to 2.7.1+c08a148
This commit is contained in:
@@ -14,6 +14,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "ui/effects/round_checkbox.h"
|
||||
#include "mtproto/sender.h"
|
||||
|
||||
namespace style {
|
||||
struct MultiSelect;
|
||||
struct InputField;
|
||||
struct PeerList;
|
||||
} // namespace style
|
||||
|
||||
namespace SendMenu {
|
||||
enum class Type;
|
||||
} // namespace SendMenu
|
||||
@@ -62,14 +68,24 @@ public:
|
||||
using FilterCallback = Fn<bool(PeerData*)>;
|
||||
using GoToChatCallback = Fn<void(PeerData *peer)>;
|
||||
|
||||
ShareBox(
|
||||
QWidget*,
|
||||
not_null<Window::SessionNavigation*> navigation,
|
||||
CopyCallback &©Callback,
|
||||
SubmitCallback &&submitCallback,
|
||||
FilterCallback &&filterCallback,
|
||||
GoToChatCallback &&goToChatCallback = nullptr,
|
||||
bool hasMedia = false);
|
||||
struct Descriptor {
|
||||
not_null<Main::Session*> session;
|
||||
CopyCallback copyCallback;
|
||||
SubmitCallback submitCallback;
|
||||
FilterCallback filterCallback;
|
||||
GoToChatCallback goToChatCallback;
|
||||
Window::SessionNavigation *navigation = nullptr;
|
||||
Fn<void(not_null<Ui::InputField*>)> initSpellchecker;
|
||||
Fn<void(not_null<Ui::InputField*>)> initEditLink;
|
||||
object_ptr<Ui::RpWidget> bottomWidget = { nullptr };
|
||||
rpl::producer<QString> copyLinkText;
|
||||
const style::MultiSelect *stMultiSelect = nullptr;
|
||||
const style::InputField *stComment = nullptr;
|
||||
const style::PeerList *st = nullptr;
|
||||
bool hasMedia = false;
|
||||
bool isShare = true;
|
||||
};
|
||||
ShareBox(QWidget*, Descriptor &&descriptor);
|
||||
|
||||
protected:
|
||||
void prepare() override;
|
||||
@@ -109,25 +125,20 @@ private:
|
||||
void peopleDone(
|
||||
const MTPcontacts_Found &result,
|
||||
mtpRequestId requestId);
|
||||
void peopleFail(const RPCError &error, mtpRequestId requestId);
|
||||
void peopleFail(const MTP::Error &error, mtpRequestId requestId);
|
||||
|
||||
const not_null<Window::SessionNavigation*> _navigation;
|
||||
Descriptor _descriptor;
|
||||
MTP::Sender _api;
|
||||
|
||||
CopyCallback _copyCallback;
|
||||
SubmitCallback _submitCallback;
|
||||
FilterCallback _filterCallback;
|
||||
GoToChatCallback _goToChatCallback;
|
||||
|
||||
bool _hasMediaMessages = false;
|
||||
|
||||
object_ptr<Ui::MultiSelect> _select;
|
||||
object_ptr<Ui::SlideWrap<Ui::InputField>> _comment;
|
||||
object_ptr<Ui::RpWidget> _bottomWidget;
|
||||
|
||||
class Inner;
|
||||
QPointer<Inner> _inner;
|
||||
|
||||
bool _hasSelected = false;
|
||||
rpl::variable<QString> _copyLinkText;
|
||||
|
||||
base::Timer _searchTimer;
|
||||
QString _peopleQuery;
|
||||
|
Reference in New Issue
Block a user