Fix on new canonical alias events.
This commit is contained in:
@@ -232,7 +232,7 @@ Dialog {
|
||||
Layout.preferredWidth: 100
|
||||
|
||||
wrapMode: Label.Wrap
|
||||
text: "Main Alias"
|
||||
text: "Canonical Alias"
|
||||
color: MPalette.lighter
|
||||
}
|
||||
|
||||
@@ -243,12 +243,12 @@ Dialog {
|
||||
|
||||
enabled: canChangeCanonicalAlias
|
||||
|
||||
model: room.remoteAliases
|
||||
model: room.aliases
|
||||
|
||||
currentIndex: room.remoteAliases.indexOf(room.canonicalAlias)
|
||||
currentIndex: room.aliases.indexOf(room.canonicalAlias)
|
||||
onCurrentIndexChanged: {
|
||||
if (room.canonicalAlias != room.remoteAliases[currentIndex]) {
|
||||
room.setCanonicalAlias(room.remoteAliases[currentIndex])
|
||||
if (room.canonicalAlias != room.aliases[currentIndex]) {
|
||||
room.setCanonicalAlias(room.aliases[currentIndex])
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -257,12 +257,14 @@ Dialog {
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
visible: room.altAliases && room.altAliases.length
|
||||
|
||||
Label {
|
||||
Layout.preferredWidth: 100
|
||||
Layout.alignment: Qt.AlignTop
|
||||
|
||||
wrapMode: Label.Wrap
|
||||
text: "Local Aliases"
|
||||
text: "Alt Aliases"
|
||||
color: MPalette.lighter
|
||||
}
|
||||
|
||||
@@ -272,7 +274,7 @@ Dialog {
|
||||
spacing: 0
|
||||
|
||||
Repeater {
|
||||
model: room.localAliases
|
||||
model: room.altAliases
|
||||
|
||||
delegate: RowLayout {
|
||||
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