mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-04-21 21:52:03 +02:00
misc: remove unused method
Change-Id: Ib58dabb342a293a1e4e699fcb75b1b04e5541bc4
This commit is contained in:
parent
452d49a439
commit
e3e4de0fe7
2 changed files with 0 additions and 55 deletions
|
@ -258,12 +258,6 @@ public:
|
|||
* @param uid of the conversation
|
||||
*/
|
||||
void clearHistory(const QString& uid);
|
||||
/**
|
||||
* change the status of the interaction from UNREAD to READ
|
||||
* @param convId, id of the conversation
|
||||
* @param msgId, id of the interaction
|
||||
*/
|
||||
void setInteractionRead(const QString& convId, const QString& msgId);
|
||||
/**
|
||||
* Clears the unread text messages of a conversation
|
||||
* @param convId, uid of the conversation
|
||||
|
|
|
@ -1623,55 +1623,6 @@ ConversationModel::clearAllHistory()
|
|||
Q_EMIT modelChanged();
|
||||
}
|
||||
|
||||
void
|
||||
ConversationModel::setInteractionRead(const QString& convId, const QString& interactionId)
|
||||
{
|
||||
auto conversationIdx = pimpl_->indexOf(convId);
|
||||
if (conversationIdx == -1) {
|
||||
return;
|
||||
}
|
||||
bool emitUpdated = false;
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(pimpl_->interactionsLocks[convId]);
|
||||
auto& interactions = pimpl_->conversations[conversationIdx].interactions;
|
||||
auto it = interactions->find(interactionId);
|
||||
if (it != interactions->end()) {
|
||||
emitUpdated = true;
|
||||
if (it->second.isRead) {
|
||||
return;
|
||||
}
|
||||
it->second.isRead = true;
|
||||
interactions->emitDataChanged(it, {MessageList::Role::IsRead});
|
||||
if (pimpl_->conversations[conversationIdx].unreadMessages != 0)
|
||||
pimpl_->conversations[conversationIdx].unreadMessages -= 1;
|
||||
}
|
||||
}
|
||||
if (emitUpdated) {
|
||||
pimpl_->invalidateModel();
|
||||
if (pimpl_->conversations[conversationIdx].isSwarm()) {
|
||||
ConfigurationManager::instance().setMessageDisplayed(owner.id,
|
||||
"swarm:" + convId,
|
||||
interactionId,
|
||||
3);
|
||||
} else {
|
||||
auto daemonId = storage::getDaemonIdByInteractionId(pimpl_->db, interactionId);
|
||||
if (owner.profileInfo.type != profile::Type::SIP) {
|
||||
ConfigurationManager::instance()
|
||||
.setMessageDisplayed(owner.id,
|
||||
"jami:"
|
||||
+ pimpl_
|
||||
->peersForConversation(
|
||||
pimpl_->conversations[conversationIdx])
|
||||
.front(),
|
||||
daemonId,
|
||||
3);
|
||||
}
|
||||
storage::setInteractionRead(pimpl_->db, interactionId);
|
||||
}
|
||||
Q_EMIT pimpl_->behaviorController.newReadInteraction(owner.id, convId, interactionId);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ConversationModel::clearUnreadInteractions(const QString& convId)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue