Fix on new canonical alias events.
This commit is contained in:
@@ -232,7 +232,7 @@ Dialog {
|
|||||||
Layout.preferredWidth: 100
|
Layout.preferredWidth: 100
|
||||||
|
|
||||||
wrapMode: Label.Wrap
|
wrapMode: Label.Wrap
|
||||||
text: "Main Alias"
|
text: "Canonical Alias"
|
||||||
color: MPalette.lighter
|
color: MPalette.lighter
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -243,12 +243,12 @@ Dialog {
|
|||||||
|
|
||||||
enabled: canChangeCanonicalAlias
|
enabled: canChangeCanonicalAlias
|
||||||
|
|
||||||
model: room.remoteAliases
|
model: room.aliases
|
||||||
|
|
||||||
currentIndex: room.remoteAliases.indexOf(room.canonicalAlias)
|
currentIndex: room.aliases.indexOf(room.canonicalAlias)
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
if (room.canonicalAlias != room.remoteAliases[currentIndex]) {
|
if (room.canonicalAlias != room.aliases[currentIndex]) {
|
||||||
room.setCanonicalAlias(room.remoteAliases[currentIndex])
|
room.setCanonicalAlias(room.aliases[currentIndex])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -257,12 +257,14 @@ Dialog {
|
|||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
visible: room.altAliases && room.altAliases.length
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.preferredWidth: 100
|
Layout.preferredWidth: 100
|
||||||
Layout.alignment: Qt.AlignTop
|
Layout.alignment: Qt.AlignTop
|
||||||
|
|
||||||
wrapMode: Label.Wrap
|
wrapMode: Label.Wrap
|
||||||
text: "Local Aliases"
|
text: "Alt Aliases"
|
||||||
color: MPalette.lighter
|
color: MPalette.lighter
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -272,7 +274,7 @@ Dialog {
|
|||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
model: room.localAliases
|
model: room.altAliases
|
||||||
|
|
||||||
delegate: RowLayout {
|
delegate: RowLayout {
|
||||||
Layout.maximumWidth: parent.width
|
Layout.maximumWidth: parent.width
|
||||||
@@ -302,42 +304,6 @@ Dialog {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
Label {
|
|
||||||
Layout.preferredWidth: 100
|
|
||||||
Layout.alignment: Qt.AlignTop
|
|
||||||
|
|
||||||
wrapMode: Label.Wrap
|
|
||||||
text: "Remote Aliases"
|
|
||||||
color: MPalette.lighter
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
spacing: 0
|
|
||||||
|
|
||||||
Repeater {
|
|
||||||
model: {
|
|
||||||
var localAliases = room.localAliases
|
|
||||||
var remoteAliases = room.remoteAliases
|
|
||||||
return remoteAliases.filter(n => !localAliases.includes(n))
|
|
||||||
}
|
|
||||||
|
|
||||||
delegate: Label {
|
|
||||||
width: parent.width
|
|
||||||
|
|
||||||
text: modelData
|
|
||||||
|
|
||||||
font.pixelSize: 12
|
|
||||||
color: MPalette.lighter
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Submodule include/libQuotient updated: d06bbd6633...79a3e9e2ac
Reference in New Issue
Block a user