Add account settings page
Display name change working
This commit is contained in:
@@ -13,9 +13,10 @@ Row {
|
||||
|
||||
HUserAvatar {
|
||||
id: avatar
|
||||
hidden: combine
|
||||
userId: model.senderId
|
||||
dimension: model.showNameLine ? 48 : 28
|
||||
width: model.showNameLine ? 48 : 28
|
||||
height: combine ? 1 : model.showNameLine ? 48 : 28
|
||||
opacity: combine ? 0 : 1
|
||||
visible: ! isOwn
|
||||
}
|
||||
|
||||
@@ -26,7 +27,7 @@ Row {
|
||||
|
||||
//width: nameLabel.implicitWidth
|
||||
width: Math.min(
|
||||
roomEventListView.width - avatar.width - messageContent.spacing,
|
||||
eventList.width - avatar.width - messageContent.spacing,
|
||||
theme.fontSize.normal * 0.5 * 75, // 600 with 16px font
|
||||
Math.max(
|
||||
nameLabel.visible ? nameLabel.implicitWidth : 0,
|
||||
|
@@ -16,8 +16,8 @@ Column {
|
||||
function getPreviousItem(nth) {
|
||||
// Remember, index 0 = newest bottomest message
|
||||
nth = nth || 1
|
||||
return roomEventListView.model.count - 1 > model.index + nth ?
|
||||
roomEventListView.model.get(model.index + nth) : null
|
||||
return eventList.model.count - 1 > model.index + nth ?
|
||||
eventList.model.get(model.index + nth) : null
|
||||
}
|
||||
|
||||
property var previousItem: getPreviousItem()
|
||||
@@ -60,7 +60,7 @@ Column {
|
||||
property int verticalPadding: 4
|
||||
|
||||
ListView.onAdd: {
|
||||
var nextDelegate = roomEventListView.contentItem.children[index]
|
||||
var nextDelegate = eventList.contentItem.children[index]
|
||||
if (nextDelegate) { nextDelegate.reloadPreviousItem() }
|
||||
}
|
||||
|
||||
|
@@ -6,14 +6,14 @@ import SortFilterProxyModel 0.2
|
||||
import "../../Base"
|
||||
|
||||
HRectangle {
|
||||
property alias listView: roomEventListView
|
||||
property alias listView: eventList
|
||||
|
||||
property int space: 8
|
||||
|
||||
color: theme.chat.roomEventList.background
|
||||
color: theme.chat.eventList.background
|
||||
|
||||
HListView {
|
||||
id: roomEventListView
|
||||
id: eventList
|
||||
clip: true
|
||||
|
||||
model: HListModel {
|
||||
@@ -48,12 +48,12 @@ HRectangle {
|
||||
if (chatPage.category != "Invites" && canLoad && yPos <= 0.1) {
|
||||
zz += 1
|
||||
print(canLoad, zz)
|
||||
canLoad = false
|
||||
eventList.canLoad = false
|
||||
py.callClientCoro(
|
||||
chatPage.userId,
|
||||
"load_past_events",
|
||||
[chatPage.roomId],
|
||||
function(more_to_load) { canLoad = more_to_load }
|
||||
function(more_to_load) { eventList.canLoad = more_to_load }
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,7 @@ HRectangle {
|
||||
HNoticePage {
|
||||
text: qsTr("Nothing to show here yet...")
|
||||
|
||||
visible: roomEventListView.model.count < 1
|
||||
visible: eventList.model.count < 1
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user