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

Start voice chat link sharing.

This commit is contained in:
John Preston
2021-03-10 20:38:15 +04:00
parent cd8c9a58df
commit 6786d44b69
7 changed files with 257 additions and 95 deletions

View File

@@ -60,12 +60,16 @@ public:
Api::SendOptions)>;
using FilterCallback = Fn<bool(PeerData*)>;
ShareBox(
QWidget*,
not_null<Window::SessionNavigation*> navigation,
CopyCallback &&copyCallback,
SubmitCallback &&submitCallback,
FilterCallback &&filterCallback);
struct Descriptor {
not_null<Main::Session*> session;
CopyCallback copyCallback;
SubmitCallback submitCallback;
FilterCallback filterCallback;
Window::SessionNavigation *navigation = nullptr;
Fn<void(not_null<Ui::InputField*>)> initSpellchecker;
Fn<void(not_null<Ui::InputField*>)> initEditLink;
};
ShareBox(QWidget*, Descriptor &&descriptor);
protected:
void prepare() override;
@@ -104,13 +108,9 @@ private:
mtpRequestId requestId);
void peopleFail(const RPCError &error, mtpRequestId requestId);
const not_null<Window::SessionNavigation*> _navigation;
Descriptor _descriptor;
MTP::Sender _api;
CopyCallback _copyCallback;
SubmitCallback _submitCallback;
FilterCallback _filterCallback;
object_ptr<Ui::MultiSelect> _select;
object_ptr<Ui::SlideWrap<Ui::InputField>> _comment;