mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Allow editing topic title and icon.
This commit is contained in:
@@ -1258,9 +1258,7 @@ base::unique_qptr<Ui::PopupMenu> Members::Controller::createRowContextMenu(
|
||||
result->menu(),
|
||||
st::groupCallPopupCoverMenu,
|
||||
st::groupCallMenuCover,
|
||||
Info::Profile::NameValue(
|
||||
participantPeer
|
||||
) | rpl::map([](const auto &text) { return text.text; }),
|
||||
Info::Profile::NameValue(participantPeer),
|
||||
PrepareShortInfoStatus(participantPeer),
|
||||
PrepareShortInfoUserpic(
|
||||
participantPeer,
|
||||
|
@@ -182,10 +182,10 @@ void JoinAsAction::prepare() {
|
||||
rpl::combine(
|
||||
tr::lng_group_call_display_as_header(),
|
||||
Info::Profile::NameValue(_peer)
|
||||
) | rpl::start_with_next([=](QString text, TextWithEntities name) {
|
||||
) | rpl::start_with_next([=](QString text, QString name) {
|
||||
const auto &padding = st::groupCallJoinAsPadding;
|
||||
_text.setMarkedText(_st.itemStyle, { text }, MenuTextOptions);
|
||||
_name.setMarkedText(_st.itemStyle, name, MenuTextOptions);
|
||||
_name.setMarkedText(_st.itemStyle, { name }, MenuTextOptions);
|
||||
const auto textWidth = _text.maxWidth();
|
||||
const auto nameWidth = _name.maxWidth();
|
||||
const auto textLeft = padding.left()
|
||||
|
@@ -221,8 +221,8 @@ void Panel::migrate(not_null<ChannelData*> channel) {
|
||||
void Panel::subscribeToPeerChanges() {
|
||||
Info::Profile::NameValue(
|
||||
_peer
|
||||
) | rpl::start_with_next([=](const TextWithEntities &name) {
|
||||
window()->setTitle(name.text);
|
||||
) | rpl::start_with_next([=](const QString &name) {
|
||||
window()->setTitle(name);
|
||||
}, _peerLifetime);
|
||||
}
|
||||
|
||||
@@ -2336,10 +2336,8 @@ void Panel::refreshTitle() {
|
||||
) | rpl::map([=](not_null<Data::GroupCall*> real) {
|
||||
return real->titleValue();
|
||||
}) | rpl::flatten_latest())
|
||||
) | rpl::map([=](
|
||||
const TextWithEntities &name,
|
||||
const QString &title) {
|
||||
return title.isEmpty() ? name.text : title;
|
||||
) | rpl::map([=](const QString &name, const QString &title) {
|
||||
return title.isEmpty() ? name : title;
|
||||
}) | rpl::after_next([=] {
|
||||
refreshTitleGeometry();
|
||||
});
|
||||
|
Reference in New Issue
Block a user