Show new messages on the bottom
Summary: Like every messaging app I know does Test Plan: Compare message order with phone Reviewers: #kde_connect, sredman Reviewed By: #kde_connect, sredman Subscribers: sredman, kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D14638
This commit is contained in:
parent
21b52d7dcf
commit
5f63f78f77
2 changed files with 10 additions and 5 deletions
|
@ -44,6 +44,8 @@ public:
|
|||
DateRole,
|
||||
};
|
||||
|
||||
Q_ENUMS(Roles)
|
||||
|
||||
QString threadId() const;
|
||||
void setThreadId(const QString &threadId);
|
||||
|
||||
|
|
|
@ -39,11 +39,14 @@ Kirigami.ScrollablePage
|
|||
title: person && person.name ? i18n("%1: %2", person.name, phoneNumber) : phoneNumber
|
||||
|
||||
ListView {
|
||||
|
||||
model: ConversationModel {
|
||||
model: QSortFilterProxyModel {
|
||||
id: model
|
||||
deviceId: device.id()
|
||||
threadId: page.conversationId
|
||||
sortOrder: Qt.AscendingOrder
|
||||
sortRole: ConversationModel.DateRole
|
||||
sourceModel: ConversationModel {
|
||||
deviceId: device.id()
|
||||
threadId: page.conversationId
|
||||
}
|
||||
}
|
||||
|
||||
spacing: Kirigami.Units.largeSpacing
|
||||
|
@ -62,7 +65,7 @@ Kirigami.ScrollablePage
|
|||
placeholderText: i18n("Say hi...")
|
||||
onAccepted: {
|
||||
console.log("sending sms", page.phoneNumber)
|
||||
model.sendReplyToConversation(message.text)
|
||||
model.sourceModel.sendReplyToConversation(message.text)
|
||||
text = ""
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue