fix(Communities): fix channel popup position and field hydration

There are two regressions introduced in 080767c338 where
the `CreateChannelPopup` isn't properly centered when triggered in edit mode,
and that the channel name field isn't hydrated with channel data.

This commits fixes both bugs.
This commit is contained in:
Pascal Precht 2021-07-15 13:05:17 +02:00 committed by Iuri Matias
parent e832666123
commit bb9beef837
2 changed files with 2 additions and 0 deletions

View File

@ -37,6 +37,7 @@ StatusModal {
contentComponent.channelName.text = ""
if (isEdit) {
header.title = qsTr("Edit #%1").arg(channel.name);
contentComponent.channelName.text = channel.name
}
contentComponent.channelName.forceActiveFocus(Qt.MouseFocusReason)
}

View File

@ -520,6 +520,7 @@ StatusAppLayout {
Component {
id: editChannelPopup
CreateChannelPopup {
anchors.centerIn: parent
isEdit: true
pinnedMessagesPopupComponent: chatLayoutContainer.chatColumn.pinnedMessagesPopupComponent
onClosed: {