Commit 3807eba2 authored by Michael Lang's avatar Michael Lang Committed by Jonah Brüchert
Browse files

Improve new conversation selection page

- Search as you type on touch screen
- Don't select an initial contact when opening
- Correctly match phone number with existing conversation
parent fd8f3e21
......@@ -18,6 +18,7 @@ Kirigami.ScrollablePage {
contentItem: Kirigami.ActionTextField {
id: searchField
onTextChanged: contactsProxyModel.setFilterFixedString(text)
inputMethodHints: Qt.ImhNoPredictiveText
placeholderText: i18n("Search or enter number…")
focusSequence: "Ctrl+F"
rightActions: [
......@@ -72,6 +73,8 @@ Kirigami.ScrollablePage {
reuseItems: true
currentIndex: -1
delegate: Kirigami.AbstractListItem {
width: contactsList.width
contentItem: RowLayout {
......
......@@ -27,7 +27,7 @@
MessageModel::MessageModel(ChannelHandler &handler, const QString &phoneNumber, QObject *parent)
: QAbstractListModel(parent)
, m_handler(handler)
, m_phoneNumber(phoneNumber)
, m_phoneNumber(phoneNumberUtils::normalizeNumber(phoneNumber))
, m_personData(new KPeople::PersonData(ContactPhoneNumberMapper::instance().uriForNumber(phoneNumber), this))
{
connect(&m_handler.msgManager(), &QOfonoMessageManager::incomingMessage, this, [=, this](const QString &text, const QVariantMap &info) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment