mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
leave conversation
This commit is contained in:
parent
3546287649
commit
2e0d963bd2
6 changed files with 921 additions and 832 deletions
|
|
@ -166,7 +166,7 @@ void LimitProxy::displayMore() {
|
|||
auto model = sourceModel();
|
||||
int newCount = getDisplayCount(model ? model->rowCount() : 0, mMaxDisplayItems + mDisplayItemsStep);
|
||||
if (newCount != oldCount) {
|
||||
setMaxDisplayItems(mMaxDisplayItems + mDisplayItemsStep);
|
||||
setMaxDisplayItems(newCount);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -364,6 +364,39 @@ ListView {
|
|||
chatroomPopup.close()
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
visible: mainItem.currentChatGui && !mainItem.currentChatGui.core.isReadOnly
|
||||
Layout.preferredHeight: Math.min(1, Math.round(1 * DefaultStyle.dp))
|
||||
color: DefaultStyle.main2_400
|
||||
}
|
||||
IconLabelButton {
|
||||
//: "leave"
|
||||
text: qsTr("chat_room_leave")
|
||||
visible: mainItem.currentChatGui && !mainItem.currentChatGui.core.isReadOnly
|
||||
icon.source: AppIcons.trashCan
|
||||
spacing: Math.round(10 * DefaultStyle.dp)
|
||||
Layout.fillWidth: true
|
||||
onClicked: {
|
||||
//: leave the conversation ?
|
||||
mainWindow.showConfirmationLambdaPopup(qsTr("chat_list_leave_chat_popup_title"),
|
||||
//: You will not be able to send or receive messages in this conversation anymore. Do You want to continue ?
|
||||
qsTr("chat_list_leave_chat_popup_message"),
|
||||
"",
|
||||
function(confirmed) {
|
||||
if (confirmed) {
|
||||
modelData.core.lLeave()
|
||||
chatroomPopup.close()
|
||||
}
|
||||
})
|
||||
}
|
||||
style: ButtonStyle.hoveredBackground
|
||||
}
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Math.min(1, Math.round(1 * DefaultStyle.dp))
|
||||
color: DefaultStyle.main2_400
|
||||
}
|
||||
IconLabelButton {
|
||||
//: "Delete"
|
||||
text: qsTr("chat_room_delete")
|
||||
|
|
|
|||
|
|
@ -97,6 +97,8 @@ ListView {
|
|||
chatGui: mainItem.chat
|
||||
// scroll when in view and message inserted
|
||||
filterText: mainItem.filterText
|
||||
initialDisplayItems: 10
|
||||
displayItemsStep: 3 * initialDisplayItems / 2
|
||||
onEventInserted: (index, gui) => {
|
||||
if (!mainItem.visible) return
|
||||
if(mainItem.lastItemVisible) mainItem.positionViewAtIndex(index, ListView.End)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue