mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-06 03:42:56 +00:00
Fix attach submenu in editor.
This commit is contained in:
@@ -7249,7 +7249,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_article_media_slideshow" = "Slideshow";
|
||||
"lng_article_insert_details" = "Details";
|
||||
"lng_article_insert_table" = "Table";
|
||||
"lng_article_insert_map" = "Map";
|
||||
"lng_article_limit_length" = "The article is too long.";
|
||||
"lng_article_limit_depth" = "The article is nested too deeply.";
|
||||
"lng_article_limit_blocks" = "The article has too many blocks.";
|
||||
|
||||
@@ -69,6 +69,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "ui/chat/attach/attach_bot_webview.h"
|
||||
#include "ui/controls/location_picker.h"
|
||||
#include "ui/controls/userpic_button.h"
|
||||
#include "ui/delayed_activation.h"
|
||||
#include "ui/effects/ripple_animation.h"
|
||||
#include "ui/painter.h"
|
||||
#include "ui/text/text_custom_emoji.h"
|
||||
@@ -2983,6 +2984,7 @@ std::unique_ptr<Ui::DropdownMenu> MakeAttachBotsMenu(
|
||||
if (Data::CanSendAnyOf(peer, locationType, false)
|
||||
&& Ui::LocationPicker::Available(config)) {
|
||||
raw->addAction(tr::lng_maps_point(tr::now), [=] {
|
||||
Ui::PreventDelayedActivation();
|
||||
ChooseAndSendLocation(controller, config, actionFactory());
|
||||
}, &st::menuIconAddress);
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ enum class ToolbarActionId : uchar {
|
||||
case ToolbarActionId::Table:
|
||||
return tr::lng_article_insert_table(tr::now);
|
||||
case ToolbarActionId::Location:
|
||||
return tr::lng_article_insert_map(tr::now);
|
||||
return tr::lng_maps_point(tr::now);
|
||||
case ToolbarActionId::Divider:
|
||||
return tr::lng_article_insert_divider(tr::now);
|
||||
}
|
||||
@@ -785,8 +785,8 @@ void Toolbar::fillAttachMenu(not_null<Ui::PopupMenu*> menu) {
|
||||
RequestMediaType::PhotoVideo);
|
||||
}
|
||||
},
|
||||
&st::menuIconPhoto,
|
||||
&st::menuIconPhoto);
|
||||
&st::ivEditorToolbarAttachIcon,
|
||||
&st::ivEditorToolbarAttachIcon);
|
||||
menu->addAction(
|
||||
tr::lng_in_dlg_audio_file(tr::now),
|
||||
[=] {
|
||||
@@ -796,17 +796,18 @@ void Toolbar::fillAttachMenu(not_null<Ui::PopupMenu*> menu) {
|
||||
RequestMediaType::Audio);
|
||||
}
|
||||
},
|
||||
&st::ivEditorToolbarAudioIcon,
|
||||
&st::ivEditorToolbarAudioIcon);
|
||||
&st::menuIconSoundOn,
|
||||
&st::menuIconSoundOn);
|
||||
if (_requestMap) {
|
||||
menu->addAction(
|
||||
tr::lng_article_insert_map(tr::now),
|
||||
tr::lng_maps_point(tr::now),
|
||||
[=] {
|
||||
if (_editor) {
|
||||
const auto parent = _tooltipParent;
|
||||
auto closeRequests = parent
|
||||
? static_cast<Ui::RpWidget*>(parent.data())->death()
|
||||
: rpl::never<>();
|
||||
Ui::PreventDelayedActivation();
|
||||
_requestMap(
|
||||
not_null<Widget*>(_editor.data()),
|
||||
parent,
|
||||
|
||||
@@ -187,7 +187,6 @@ ivEditorToolbarBulletListIcon: icon {{ "menu/rich/bullet_list-24x24", menuIconCo
|
||||
ivEditorToolbarTaskListIcon: icon {{ "menu/rich/task_list-24x24", menuIconColor }};
|
||||
ivEditorToolbarPullquoteIcon: icon {{ "menu/rich/pullquote-24x24", menuIconColor }};
|
||||
ivEditorToolbarAttachIcon: icon {{ "menu/rich/attach-24x24", menuIconColor }};
|
||||
ivEditorToolbarAudioIcon: icon {{ "menu/rich/audio-24x24", menuIconColor }};
|
||||
ivEditorToolbarDetailsIcon: icon {{ "menu/rich/details-24x24", menuIconColor }};
|
||||
ivEditorToolbarTableIcon: icon {{ "menu/rich/table-24x24", menuIconColor }};
|
||||
ivEditorToolbarLocationIcon: icon {{ "menu/rich/location-24x24", menuIconColor }};
|
||||
|
||||
Reference in New Issue
Block a user