mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Implement suggestion of changes.
This commit is contained in:
@@ -232,12 +232,14 @@ EditCaptionBox::EditCaptionBox(
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<HistoryItem*> item,
|
||||
TextWithTags &&text,
|
||||
SuggestPostOptions suggest,
|
||||
bool spoilered,
|
||||
bool invertCaption,
|
||||
Ui::PreparedList &&list,
|
||||
Fn<void()> saved)
|
||||
: _controller(controller)
|
||||
, _historyItem(item)
|
||||
, _suggest(suggest)
|
||||
, _isAllowedEditMedia(item->allowsEditMedia())
|
||||
, _albumType(ComputeAlbumType(item))
|
||||
, _controls(base::make_unique_q<Ui::VerticalLayout>(this))
|
||||
@@ -271,6 +273,7 @@ void EditCaptionBox::StartMediaReplace(
|
||||
not_null<Window::SessionController*> controller,
|
||||
FullMsgId itemId,
|
||||
TextWithTags text,
|
||||
SuggestPostOptions suggest,
|
||||
bool spoilered,
|
||||
bool invertCaption,
|
||||
Fn<void()> saved) {
|
||||
@@ -284,6 +287,7 @@ void EditCaptionBox::StartMediaReplace(
|
||||
controller,
|
||||
item,
|
||||
std::move(text),
|
||||
suggest,
|
||||
spoilered,
|
||||
invertCaption,
|
||||
std::move(list),
|
||||
@@ -300,6 +304,7 @@ void EditCaptionBox::StartMediaReplace(
|
||||
FullMsgId itemId,
|
||||
Ui::PreparedList &&list,
|
||||
TextWithTags text,
|
||||
SuggestPostOptions suggest,
|
||||
bool spoilered,
|
||||
bool invertCaption,
|
||||
Fn<void()> saved) {
|
||||
@@ -335,6 +340,7 @@ void EditCaptionBox::StartMediaReplace(
|
||||
controller,
|
||||
item,
|
||||
std::move(text),
|
||||
suggest,
|
||||
spoilered,
|
||||
invertCaption,
|
||||
std::move(list),
|
||||
@@ -347,6 +353,7 @@ void EditCaptionBox::StartPhotoEdit(
|
||||
std::shared_ptr<Data::PhotoMedia> media,
|
||||
FullMsgId itemId,
|
||||
TextWithTags text,
|
||||
SuggestPostOptions suggest,
|
||||
bool spoilered,
|
||||
bool invertCaption,
|
||||
Fn<void()> saved) {
|
||||
@@ -365,6 +372,7 @@ void EditCaptionBox::StartPhotoEdit(
|
||||
controller,
|
||||
item,
|
||||
std::move(text),
|
||||
suggest,
|
||||
spoilered,
|
||||
invertCaption,
|
||||
std::move(list),
|
||||
@@ -1001,6 +1009,7 @@ void EditCaptionBox::save() {
|
||||
};
|
||||
|
||||
auto options = Api::SendOptions();
|
||||
options.suggest = _suggest;
|
||||
options.scheduled = item->isScheduled() ? item->date() : 0;
|
||||
options.shortcutId = item->shortcutId();
|
||||
options.invertCaption = _mediaEditManager.invertCaption();
|
||||
|
||||
Reference in New Issue
Block a user