fix(ContactsColumnView): Removed margin when the list positioned not at the end
Closes #7526
This commit is contained in:
parent
f48aee2e44
commit
b984b04c70
|
@ -44,6 +44,7 @@ Item {
|
||||||
anchors {
|
anchors {
|
||||||
fill: parent
|
fill: parent
|
||||||
margins: Style.current.padding
|
margins: Style.current.padding
|
||||||
|
bottomMargin: 0
|
||||||
}
|
}
|
||||||
spacing: Style.current.padding
|
spacing: Style.current.padding
|
||||||
|
|
||||||
|
@ -139,102 +140,111 @@ Item {
|
||||||
onClicked: Global.openPopup(contactRequestsPopup)
|
onClicked: Global.openPopup(contactRequestsPopup)
|
||||||
}
|
}
|
||||||
|
|
||||||
// chat list
|
Item {
|
||||||
StatusScrollView {
|
|
||||||
id: scroll
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
||||||
StatusChatList {
|
clip: true
|
||||||
id: channelList
|
|
||||||
objectName: "ContactsColumnView_chatList"
|
// chat list
|
||||||
width: scroll.availableWidth
|
StatusScrollView {
|
||||||
model: SortFilterProxyModel {
|
id: scroll
|
||||||
sourceModel: root.chatSectionModule.model
|
|
||||||
sorters: RoleSorter {
|
clip: false
|
||||||
roleName: "lastMessageTimestamp"
|
anchors.fill: parent
|
||||||
sortOrder: Qt.DescendingOrder
|
anchors.bottomMargin: Style.current.padding
|
||||||
|
|
||||||
|
StatusChatList {
|
||||||
|
id: channelList
|
||||||
|
objectName: "ContactsColumnView_chatList"
|
||||||
|
width: scroll.availableWidth
|
||||||
|
model: SortFilterProxyModel {
|
||||||
|
sourceModel: root.chatSectionModule.model
|
||||||
|
sorters: RoleSorter {
|
||||||
|
roleName: "lastMessageTimestamp"
|
||||||
|
sortOrder: Qt.DescendingOrder
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
highlightItem: !root.store.openCreateChat
|
highlightItem: !root.store.openCreateChat
|
||||||
isEnsVerified: function(pubKey) { return Utils.isEnsVerified(pubKey) }
|
isEnsVerified: function(pubKey) { return Utils.isEnsVerified(pubKey) }
|
||||||
onChatItemSelected: {
|
onChatItemSelected: {
|
||||||
Global.closeCreateChatView()
|
Global.closeCreateChatView()
|
||||||
root.chatSectionModule.setActiveItem(id, "")
|
root.chatSectionModule.setActiveItem(id, "")
|
||||||
}
|
}
|
||||||
onChatItemUnmuted: root.chatSectionModule.unmuteChat(id)
|
onChatItemUnmuted: root.chatSectionModule.unmuteChat(id)
|
||||||
|
|
||||||
popupMenu: ChatContextMenuView {
|
popupMenu: ChatContextMenuView {
|
||||||
id: chatContextMenuView
|
id: chatContextMenuView
|
||||||
emojiPopup: root.emojiPopup
|
emojiPopup: root.emojiPopup
|
||||||
|
|
||||||
openHandler: function (id) {
|
openHandler: function (id) {
|
||||||
let jsonObj = root.chatSectionModule.getItemAsJson(id)
|
let jsonObj = root.chatSectionModule.getItemAsJson(id)
|
||||||
let obj = JSON.parse(jsonObj)
|
let obj = JSON.parse(jsonObj)
|
||||||
if (obj.error) {
|
if (obj.error) {
|
||||||
console.error("error parsing chat item json object, id: ", id, " error: ", obj.error)
|
console.error("error parsing chat item json object, id: ", id, " error: ", obj.error)
|
||||||
close()
|
close()
|
||||||
return
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
currentFleet = root.chatSectionModule.getCurrentFleet()
|
||||||
|
isCommunityChat = root.chatSectionModule.isCommunity()
|
||||||
|
amIChatAdmin = obj.amIChatAdmin
|
||||||
|
chatId = obj.itemId
|
||||||
|
chatName = obj.name
|
||||||
|
chatDescription = obj.description
|
||||||
|
chatEmoji = obj.emoji
|
||||||
|
chatColor = obj.color
|
||||||
|
chatIcon = obj.icon
|
||||||
|
chatType = obj.type
|
||||||
|
chatMuted = obj.muted
|
||||||
}
|
}
|
||||||
|
|
||||||
currentFleet = root.chatSectionModule.getCurrentFleet()
|
onMuteChat: {
|
||||||
isCommunityChat = root.chatSectionModule.isCommunity()
|
root.chatSectionModule.muteChat(chatId)
|
||||||
amIChatAdmin = obj.amIChatAdmin
|
}
|
||||||
chatId = obj.itemId
|
|
||||||
chatName = obj.name
|
|
||||||
chatDescription = obj.description
|
|
||||||
chatEmoji = obj.emoji
|
|
||||||
chatColor = obj.color
|
|
||||||
chatIcon = obj.icon
|
|
||||||
chatType = obj.type
|
|
||||||
chatMuted = obj.muted
|
|
||||||
}
|
|
||||||
|
|
||||||
onMuteChat: {
|
onUnmuteChat: {
|
||||||
root.chatSectionModule.muteChat(chatId)
|
root.chatSectionModule.unmuteChat(chatId)
|
||||||
}
|
}
|
||||||
|
|
||||||
onUnmuteChat: {
|
onMarkAllMessagesRead: {
|
||||||
root.chatSectionModule.unmuteChat(chatId)
|
root.chatSectionModule.markAllMessagesRead(chatId)
|
||||||
}
|
}
|
||||||
|
|
||||||
onMarkAllMessagesRead: {
|
onClearChatHistory: {
|
||||||
root.chatSectionModule.markAllMessagesRead(chatId)
|
root.chatSectionModule.clearChatHistory(chatId)
|
||||||
}
|
}
|
||||||
|
|
||||||
onClearChatHistory: {
|
onRequestAllHistoricMessages: {
|
||||||
root.chatSectionModule.clearChatHistory(chatId)
|
// Not Refactored Yet - Check in the `master` branch if this is applicable here.
|
||||||
}
|
}
|
||||||
|
|
||||||
onRequestAllHistoricMessages: {
|
onLeaveChat: {
|
||||||
// Not Refactored Yet - Check in the `master` branch if this is applicable here.
|
root.chatSectionModule.leaveChat(chatId)
|
||||||
}
|
}
|
||||||
|
|
||||||
onLeaveChat: {
|
onDeleteCommunityChat: {
|
||||||
root.chatSectionModule.leaveChat(chatId)
|
// Not Refactored Yet
|
||||||
}
|
}
|
||||||
|
|
||||||
onDeleteCommunityChat: {
|
onDownloadMessages: {
|
||||||
// Not Refactored Yet
|
root.chatSectionModule.downloadMessages(chatId, file)
|
||||||
}
|
}
|
||||||
|
onDisplayProfilePopup: {
|
||||||
onDownloadMessages: {
|
Global.openProfilePopup(publicKey)
|
||||||
root.chatSectionModule.downloadMessages(chatId, file)
|
}
|
||||||
}
|
onLeaveGroup: {
|
||||||
onDisplayProfilePopup: {
|
chatSectionModule.leaveChat("", chatId, true);
|
||||||
Global.openProfilePopup(publicKey)
|
}
|
||||||
}
|
onUpdateGroupChatDetails: {
|
||||||
onLeaveGroup: {
|
chatSectionModule.updateGroupChatDetails(
|
||||||
chatSectionModule.leaveChat("", chatId, true);
|
chatId,
|
||||||
}
|
groupName,
|
||||||
onUpdateGroupChatDetails: {
|
groupColor,
|
||||||
chatSectionModule.updateGroupChatDetails(
|
groupImage
|
||||||
chatId,
|
)
|
||||||
groupName,
|
}
|
||||||
groupColor,
|
|
||||||
groupImage
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue