Skip to content
Snippets Groups Projects
Commit 66c7cd61 authored by Nicolas Jager's avatar Nicolas Jager Committed by Anthony Léonard
Browse files

rename newUnreadMessage to newInteraction


- newUnreadMessage was used only for messages. It will soon be used for
  data transfer.

- WARNING : all lrc clients need to be updated

Change-Id: Ie7b48767b36ea449c2405d796ed6faa6ea02ba51
Reviewed-by: default avatarAnthony Léonard <anthony.leonard@savoirfairelinux.com>
parent 35a50e59
Branches
No related tags found
No related merge requests found
...@@ -155,10 +155,11 @@ public: ...@@ -155,10 +155,11 @@ public:
Q_SIGNALS: Q_SIGNALS:
/** /**
* Emitted when a conversation receives a new interaction * Emitted when a conversation receives a new interaction
* @param uid of msg * @param uid of conversation
* @param msg * @param interactionId
* @param interactionInfo
*/ */
void newUnreadMessage(const std::string& uid, uint64_t msgId, const interaction::Info& msg) const; // [jn] rendre cette fonction plus générique en remplaçant message par interaction void newInteraction(const std::string& uid, uint64_t interactionId, const interaction::Info& interactionInfo) const;
/** /**
* Emitted when an interaction got a new status * Emitted when an interaction got a new status
* @param convUid conversation which owns the interaction * @param convUid conversation which owns the interaction
......
...@@ -549,7 +549,7 @@ ConversationModel::sendMessage(const std::string& uid, const std::string& body) ...@@ -549,7 +549,7 @@ ConversationModel::sendMessage(const std::string& uid, const std::string& body)
conversation.lastMessageUid = msgId; conversation.lastMessageUid = msgId;
pimpl_->dirtyConversations = true; pimpl_->dirtyConversations = true;
// Emit this signal for chatview in the client // Emit this signal for chatview in the client
emit newUnreadMessage(convId, msgId, msg); emit newInteraction(convId, msgId, msg);
// This conversation is now at the top of the list // This conversation is now at the top of the list
pimpl_->sortConversations(); pimpl_->sortConversations();
// The order has changed, informs the client to redraw the list // The order has changed, informs the client to redraw the list
...@@ -863,7 +863,7 @@ ConversationModelPimpl::slotPendingContactAccepted(const std::string& uri) ...@@ -863,7 +863,7 @@ ConversationModelPimpl::slotPendingContactAccepted(const std::string& uri)
auto conversationIdx = indexOf(conv[0]); auto conversationIdx = indexOf(conv[0]);
conversations[conversationIdx].interactions.emplace(msgId, msg); conversations[conversationIdx].interactions.emplace(msgId, msg);
dirtyConversations = true; dirtyConversations = true;
emit linked.newUnreadMessage(conv[0], msgId, msg); emit linked.newInteraction(conv[0], msgId, msg);
} catch (std::out_of_range& e) { } catch (std::out_of_range& e) {
qDebug() << "ConversationModelPimpl::slotContactAdded can't find contact"; qDebug() << "ConversationModelPimpl::slotContactAdded can't find contact";
} }
...@@ -1073,7 +1073,7 @@ ConversationModelPimpl::addOrUpdateCallMessage(const std::string& callId, const ...@@ -1073,7 +1073,7 @@ ConversationModelPimpl::addOrUpdateCallMessage(const std::string& callId, const
} }
dirtyConversations = true; dirtyConversations = true;
if (newInteraction) if (newInteraction)
emit linked.newUnreadMessage(conversation.uid, msgId, msg); emit linked.newInteraction(conversation.uid, msgId, msg);
else else
emit linked.interactionStatusUpdated(conversation.uid, msgId, msg); emit linked.interactionStatusUpdated(conversation.uid, msgId, msg);
sortConversations(); sortConversations();
...@@ -1143,7 +1143,7 @@ ConversationModelPimpl::addIncomingMessage(const std::string& from, ...@@ -1143,7 +1143,7 @@ ConversationModelPimpl::addIncomingMessage(const std::string& from,
conversations[conversationIdx].lastMessageUid = msgId; conversations[conversationIdx].lastMessageUid = msgId;
} }
dirtyConversations = true; dirtyConversations = true;
emit linked.newUnreadMessage(conv[0], msgId, msg); emit linked.newInteraction(conv[0], msgId, msg);
sortConversations(); sortConversations();
emit linked.modelSorted(); emit linked.modelSorted();
} }
...@@ -1231,7 +1231,7 @@ ConversationModelPimpl::slotIncomingTransfer(const std::string& uid, ...@@ -1231,7 +1231,7 @@ ConversationModelPimpl::slotIncomingTransfer(const std::string& uid,
const std::size_t size, const std::size_t size,
const std::size_t offset) const std::size_t offset)
{ {
emit linked.newUnreadMessage("", -1, {}); emit linked.newInteraction("", -1, {});
} }
void void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment