Re-introduce chatChanged as chat list update is no longer properly working after #40
This commit is contained in:
parent
12119c38bc
commit
92a869f7db
3 changed files with 12 additions and 0 deletions
|
@ -244,6 +244,16 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: chatListModel
|
||||
onChatChanged: {
|
||||
if (overviewPage.chatListCreated && changedChatId === chat_id) {
|
||||
// Force update of some list item elements (currently only last message text seems to create problems). dataChanged() doesn't seem to trigger them all :(
|
||||
chatListLastMessageText.text = last_message_text ? Emoji.emojify(last_message_text, Theme.fontSizeExtraSmall) : qsTr("Unknown")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
id: chatListColumn
|
||||
width: parent.width - ( 2 * Theme.horizontalPageMargin )
|
||||
|
|
|
@ -493,6 +493,7 @@ void ChatListModel::handleChatLastMessageUpdated(const QString &id, const QStrin
|
|||
}
|
||||
const QModelIndex modelIndex(index(chatIndex));
|
||||
emit dataChanged(modelIndex, modelIndex, chat->updateLastMessage(lastMessage));
|
||||
emit chatChanged(chatId);
|
||||
} else {
|
||||
ChatData *chat = hiddenChats.value(chatId);
|
||||
if (chat) {
|
||||
|
|
|
@ -54,6 +54,7 @@ private slots:
|
|||
|
||||
signals:
|
||||
void showAllChatsChanged();
|
||||
void chatChanged(const qlonglong &changedChatId);
|
||||
|
||||
private:
|
||||
class ChatData;
|
||||
|
|
Loading…
Reference in a new issue