Merge branch 'fix/ui' into 'release/6.1'

Open chat in right panel on state Created (fix #LINQT-2500)

See merge request BC/public/linphone-desktop!1803
This commit is contained in:
Gaëlle Braud 2026-04-09 13:44:18 +00:00
commit 6b0985aa76
9 changed files with 137 additions and 109 deletions

View file

@ -249,6 +249,25 @@ void ChatCore::setSelf(const QSharedPointer<ChatCore> &me) {
emit lUpdateLastUpdatedTime();
});
});
mChatModelConnection->makeConnectToModel(
&ChatModel::chatMessageSent, [this](const std::shared_ptr<linphone::ChatRoom> &chatRoom,
const std::shared_ptr<const linphone::EventLog> &eventLog) {
if (!mChatModel) {
lWarning() << log().arg("Chat model is null !");
return;
} else if (!mChatModelConnection) {
lWarning() << log().arg("Connection between Core and Model is null !");
return;
}
if (mChatModel->getMonitor() != chatRoom) return;
lInfo() << log().arg("Chat message sent in chatroom") << this << mChatModel->getTitle();
QList<QSharedPointer<EventLogCore>> list;
if (eventLog) {
emit CoreModel::getInstance()->messageSent(CoreModel::getInstance()->getCore(), chatRoom, eventLog);
} else {
lWarning() << log().arg("message sent : event log is null");
}
});
mChatModelConnection->makeConnectToCore(&ChatCore::lMarkAsRead, [this]() {
auto lastActiveWindow = Utils::getLastActiveWindow();

View file

@ -154,10 +154,8 @@ void ChatList::setSelf(QSharedPointer<ChatList> me) {
[this](std::shared_ptr<linphone::Core> core, std::shared_ptr<linphone::Account> account) { lUpdate(); });
auto addChatToList = [this](const std::shared_ptr<linphone::Core> &core,
const std::shared_ptr<linphone::ChatRoom> &room,
const std::shared_ptr<linphone::ChatMessage> &message, bool sendAddSignal = false) {
const std::shared_ptr<linphone::ChatRoom> &room, bool sendAddSignal = false) {
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
// if (!message) return;
if (room->getAccount() != core->getDefaultAccount()) {
qInfo() << log().arg("Chat room to add does not refer to current account, return");
return;
@ -181,27 +179,28 @@ void ChatList::setSelf(QSharedPointer<ChatList> me) {
auto chatCore = ChatCore::create(room);
mModelConnection->invokeToCore([this, chatCore, sendAddSignal] { addChatInList(chatCore, sendAddSignal); });
};
mModelConnection->makeConnectToModel(&CoreModel::messageReceived,
[this, addChatToList](const std::shared_ptr<linphone::Core> &core,
const std::shared_ptr<linphone::ChatRoom> &room,
const std::shared_ptr<linphone::ChatMessage> &message) {
addChatToList(core, room, message);
});
mModelConnection->makeConnectToModel(
&CoreModel::messagesReceived,
&CoreModel::messageReceived,
[this, addChatToList](const std::shared_ptr<linphone::Core> &core,
const std::shared_ptr<linphone::ChatRoom> &room,
const std::list<std::shared_ptr<linphone::ChatMessage>> &messages) {
addChatToList(core, room, messages.front());
const std::shared_ptr<linphone::ChatMessage> &message) { addChatToList(core, room); });
mModelConnection->makeConnectToModel(
&CoreModel::messagesReceived,
[this, addChatToList](
const std::shared_ptr<linphone::Core> &core, const std::shared_ptr<linphone::ChatRoom> &room,
const std::list<std::shared_ptr<linphone::ChatMessage>> &messages) { addChatToList(core, room); });
mModelConnection->makeConnectToModel(
&CoreModel::messageSent, [this, addChatToList](const std::shared_ptr<linphone::Core> &core,
const std::shared_ptr<linphone::ChatRoom> &room,
const std::shared_ptr<const linphone::EventLog> &eventLog) {
addChatToList(core, room, true);
});
mModelConnection->makeConnectToModel(
&CoreModel::newMessageReaction,
[this, addChatToList](const std::shared_ptr<linphone::Core> &core,
const std::shared_ptr<linphone::ChatRoom> &room,
const std::shared_ptr<linphone::ChatMessage> &message,
const std::shared_ptr<const linphone::ChatMessageReaction> &reaction) {
addChatToList(core, room, message);
});
[this, addChatToList](
const std::shared_ptr<linphone::Core> &core, const std::shared_ptr<linphone::ChatRoom> &room,
const std::shared_ptr<linphone::ChatMessage> &message,
const std::shared_ptr<const linphone::ChatMessageReaction> &reaction) { addChatToList(core, room); });
mModelConnection->makeConnectToModel(&CoreModel::chatRoomStateChanged,
[this, addChatToList](const std::shared_ptr<linphone::Core> &core,
const std::shared_ptr<linphone::ChatRoom> &chatRoom,
@ -211,8 +210,7 @@ void ChatList::setSelf(QSharedPointer<ChatList> me) {
if (chatRoom == CoreModel::getInstance()->mChatRoomBeingCreated) {
sendAddSignal = true;
}
CoreModel::getInstance()->mChatRoomBeingCreated = nullptr;
addChatToList(core, chatRoom, nullptr, sendAddSignal);
addChatToList(core, chatRoom, sendAddSignal);
}
});
@ -247,7 +245,10 @@ bool ChatList::addChatInList(QSharedPointer<ChatCore> chatCore, bool emitAddSign
connectItem(chatCore);
lInfo() << "Add ChatRoom" << chatCore->getTitle();
add(chatCore);
if (emitAddSignal) emit chatAdded(chatCore);
if (emitAddSignal) {
CoreModel::getInstance()->mChatRoomBeingCreated = nullptr;
emit chatAdded(chatCore);
}
return true;
}
return false;

View file

@ -175,7 +175,7 @@ bool Notifier::createNotification(Notifier::NotificationType type, QVariantMap d
// to have the Window on Top and fullscreen independant
window->setFlags((showAsTool ? Qt::Tool : Qt::WindowStaysOnTopHint) |
Qt::FramelessWindowHint);
#ifdef Q_OS_LINUX || Q_OS_WIN
#if defined(Q_OS_LINUX) || defined(Q_OS_WIN)
window->setFlag(Qt::WindowDoesNotAcceptFocus);
#endif
// for (auto it = data.begin(); it != data.end(); ++it)

View file

@ -2131,65 +2131,65 @@
<context>
<name>ChatListView</name>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="273"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="275"/>
<source>chat_message_is_writing_info</source>
<extracomment>%1 is writing</extracomment>
<translation>%1 schreibt</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="275"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="277"/>
<source>chat_message_draft_sending_text</source>
<translation>Entwurf: %1</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="421"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="423"/>
<source>chat_room_delete</source>
<extracomment>&quot;Delete&quot;</extracomment>
<translation>Löschen</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="360"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="362"/>
<source>chat_room_mute</source>
<translation>Stummschalten</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="359"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="361"/>
<source>chat_room_unmute</source>
<extracomment>&quot;Mute&quot;</extracomment>
<translation>Stummschaltung aufheben</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="373"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="375"/>
<source>chat_room_mark_as_read</source>
<extracomment>&quot;Mark as read&quot;</extracomment>
<translation>Als gelesen markieren</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="392"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="394"/>
<source>chat_room_leave</source>
<extracomment>&quot;leave&quot;</extracomment>
<translation>Verlassen</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="398"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="400"/>
<source>chat_list_leave_chat_popup_title</source>
<extracomment>leave the conversation ?</extracomment>
<translation>Chat verlassen?</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="400"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="402"/>
<source>chat_list_leave_chat_popup_message</source>
<extracomment>You will not be able to send or receive messages in this conversation anymore. Do You want to continue ?</extracomment>
<translation>Sie können in diesem Chat keine Nachrichten mehr senden oder empfangen. Möchten Sie fortfahren?</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="427"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="429"/>
<source>chat_list_delete_chat_popup_title</source>
<extracomment>Delete the conversation ?</extracomment>
<translation>Chat löschen?</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="429"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="431"/>
<source>chat_list_delete_chat_popup_message</source>
<extracomment>This conversation and all its messages will be deleted. Do You want to continue ?</extracomment>
<translation>Dieser Chat und alle seine Nachrichten werden gelöscht. Möchten Sie fortfahren?</translation>
@ -2571,74 +2571,74 @@ Stellen Sie sicher, dass Sie keine sensiblen Informationen teilen!</translation>
<translation>Chat wird erstellt...</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="95"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="98"/>
<source>chat_dialog_delete_chat_title</source>
<extracomment>Supprimer la conversation ?</extracomment>
<translation>Chat löschen?</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="97"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="100"/>
<source>chat_dialog_delete_chat_message</source>
<extracomment>&quot;La conversation et tous ses messages seront supprimés.&quot;</extracomment>
<translation>Dieser Chat und alle seine Nachrichten werden gelöscht.</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="130"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="133"/>
<source>chat_list_title</source>
<extracomment>&quot;Conversations&quot;</extracomment>
<translation>Chats</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="149"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="152"/>
<source>menu_mark_all_as_read</source>
<extracomment>&quot;mark all as read&quot;</extracomment>
<translation>Alle als gelesen markieren</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="179"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="182"/>
<source>chat_search_in_history</source>
<extracomment>&quot;Rechercher une conversation&quot;</extracomment>
<translation>Chat suchen</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="202"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="205"/>
<source>list_filter_no_result_found</source>
<extracomment>&quot;Aucun résultat&quot;</extracomment>
<translation>Kein Ergebnis</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="204"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="207"/>
<source>chat_list_empty_history</source>
<extracomment>&quot;Aucune conversation dans votre historique&quot;</extracomment>
<translation>Keine Chats in der Historie</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="282"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="285"/>
<source>chat_action_start_new_chat</source>
<extracomment>&quot;New chat&quot;</extracomment>
<translation>Neuer Chat</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="320"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="323"/>
<source>chat_start_group_chat_title</source>
<extracomment>&quot;Nouveau groupe&quot;</extracomment>
<translation>Neuer Gruppenchat</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="322"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="325"/>
<source>chat_action_start_group_chat</source>
<extracomment>&quot;Créer&quot;</extracomment>
<translation>Erstellen</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="338"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="361"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="366"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="341"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="364"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="369"/>
<source>information_popup_error_title</source>
<translation>Fehler</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="340"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="343"/>
<source>information_popup_chat_creation_failed_message</source>
<extracomment>&quot;La création a échoué&quot;</extracomment>
<translation>Erstellen fehlgeschlagen</translation>
@ -2649,25 +2649,25 @@ Stellen Sie sicher, dass Sie keine sensiblen Informationen teilen!</translation>
<translation type="obsolete">Der Codec konnte nicht installiert werden.</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="358"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="361"/>
<source>group_chat_error_must_have_name</source>
<extracomment>&quot;Un nom doit être donné au groupe</extracomment>
<translation>Für den Gruppenchat muss ein Name festgelegt werden</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="363"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="366"/>
<source>group_chat_error_no_participant</source>
<extracomment>&quot;Please select at least one participant</extracomment>
<translation>Bitte wählen Sie mindestens einen Teilnehmer aus</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="368"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="371"/>
<source>group_call_error_not_connected</source>
<extracomment>&quot;Vous n&apos;etes pas connecté&quot;</extracomment>
<translation>Sie sind nicht verbunden</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="374"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="377"/>
<source>chat_creation_in_progress</source>
<extracomment>Creation de la conversation en cours </extracomment>
<translation>Chat-Erstellung ausstehend</translation>

View file

@ -2069,65 +2069,65 @@
<context>
<name>ChatListView</name>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="273"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="275"/>
<source>chat_message_is_writing_info</source>
<extracomment>%1 is writing</extracomment>
<translation>%1 is writing</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="275"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="277"/>
<source>chat_message_draft_sending_text</source>
<translation>Draft : %1</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="421"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="423"/>
<source>chat_room_delete</source>
<extracomment>&quot;Delete&quot;</extracomment>
<translation>Delete</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="360"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="362"/>
<source>chat_room_mute</source>
<translation>Mute</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="359"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="361"/>
<source>chat_room_unmute</source>
<extracomment>&quot;Mute&quot;</extracomment>
<translation>Unmute</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="373"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="375"/>
<source>chat_room_mark_as_read</source>
<extracomment>&quot;Mark as read&quot;</extracomment>
<translation>Mark as read</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="392"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="394"/>
<source>chat_room_leave</source>
<extracomment>&quot;leave&quot;</extracomment>
<translation>Leave</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="398"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="400"/>
<source>chat_list_leave_chat_popup_title</source>
<extracomment>leave the conversation ?</extracomment>
<translation>Leave the conversation ?</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="400"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="402"/>
<source>chat_list_leave_chat_popup_message</source>
<extracomment>You will not be able to send or receive messages in this conversation anymore. Do You want to continue ?</extracomment>
<translation>You will not be able to send or receive messages in this conversation anymore. Do You want to continue ?</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="427"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="429"/>
<source>chat_list_delete_chat_popup_title</source>
<extracomment>Delete the conversation ?</extracomment>
<translation>Delete the conversation ?</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="429"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="431"/>
<source>chat_list_delete_chat_popup_message</source>
<extracomment>This conversation and all its messages will be deleted. Do You want to continue ?</extracomment>
<translation>This conversation and all its messages will be deleted. Do You want to continue ?</translation>
@ -2504,98 +2504,98 @@ Only your correspondent can decrypt them.</translation>
<translation>Chat room is being created...</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="95"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="98"/>
<source>chat_dialog_delete_chat_title</source>
<extracomment>Supprimer la conversation ?</extracomment>
<translation>Delete conversation ?</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="97"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="100"/>
<source>chat_dialog_delete_chat_message</source>
<extracomment>&quot;La conversation et tous ses messages seront supprimés.&quot;</extracomment>
<translation>This conversation and all its messages will be deleted.</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="130"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="133"/>
<source>chat_list_title</source>
<extracomment>&quot;Conversations&quot;</extracomment>
<translation>Conversations</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="149"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="152"/>
<source>menu_mark_all_as_read</source>
<extracomment>&quot;mark all as read&quot;</extracomment>
<translation>Mark all as read</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="179"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="182"/>
<source>chat_search_in_history</source>
<extracomment>&quot;Rechercher une conversation&quot;</extracomment>
<translation>Search for a chat</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="202"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="205"/>
<source>list_filter_no_result_found</source>
<extracomment>&quot;Aucun résultat&quot;</extracomment>
<translation>No result</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="204"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="207"/>
<source>chat_list_empty_history</source>
<extracomment>&quot;Aucune conversation dans votre historique&quot;</extracomment>
<translation>No conversation in history</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="282"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="285"/>
<source>chat_action_start_new_chat</source>
<extracomment>&quot;New chat&quot;</extracomment>
<translation>New conversation</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="320"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="323"/>
<source>chat_start_group_chat_title</source>
<extracomment>&quot;Nouveau groupe&quot;</extracomment>
<translation>New group</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="322"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="325"/>
<source>chat_action_start_group_chat</source>
<extracomment>&quot;Créer&quot;</extracomment>
<translation>Create</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="338"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="361"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="366"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="341"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="364"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="369"/>
<source>information_popup_error_title</source>
<translation>Error</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="340"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="343"/>
<source>information_popup_chat_creation_failed_message</source>
<extracomment>&quot;La création a échoué&quot;</extracomment>
<translation>Creation failed</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="358"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="361"/>
<source>group_chat_error_must_have_name</source>
<extracomment>&quot;Un nom doit être donné au groupe</extracomment>
<translation>A name must be set for the group</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="363"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="366"/>
<source>group_chat_error_no_participant</source>
<extracomment>&quot;Please select at least one participant</extracomment>
<translation>Please select at least one participant</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="368"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="371"/>
<source>group_call_error_not_connected</source>
<extracomment>&quot;Vous n&apos;etes pas connecté&quot;</extracomment>
<translation>You are not connected</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="374"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="377"/>
<source>chat_creation_in_progress</source>
<extracomment>Creation de la conversation en cours </extracomment>
<translation>Chat creation pending</translation>

View file

@ -2069,65 +2069,65 @@
<context>
<name>ChatListView</name>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="273"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="275"/>
<source>chat_message_is_writing_info</source>
<extracomment>%1 is writing</extracomment>
<translation>%1 est en train d&apos;écrire</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="275"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="277"/>
<source>chat_message_draft_sending_text</source>
<translation>Brouillon : %1</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="421"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="423"/>
<source>chat_room_delete</source>
<extracomment>&quot;Delete&quot;</extracomment>
<translation>Supprimer</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="360"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="362"/>
<source>chat_room_mute</source>
<translation>Mettre en sourdine</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="359"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="361"/>
<source>chat_room_unmute</source>
<extracomment>&quot;Mute&quot;</extracomment>
<translation>Enlever la sourdine </translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="373"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="375"/>
<source>chat_room_mark_as_read</source>
<extracomment>&quot;Mark as read&quot;</extracomment>
<translation>Marquer comme lu</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="392"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="394"/>
<source>chat_room_leave</source>
<extracomment>&quot;leave&quot;</extracomment>
<translation>Quitter la conversation</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="398"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="400"/>
<source>chat_list_leave_chat_popup_title</source>
<extracomment>leave the conversation ?</extracomment>
<translation>Quitter la conversation ?</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="400"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="402"/>
<source>chat_list_leave_chat_popup_message</source>
<extracomment>You will not be able to send or receive messages in this conversation anymore. Do You want to continue ?</extracomment>
<translation>Vous ne pourrez plus envoyer ou recevoir de messages dans cette conversation. Souhaitez-vous continuer ?</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="427"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="429"/>
<source>chat_list_delete_chat_popup_title</source>
<extracomment>Delete the conversation ?</extracomment>
<translation>Supprimer la conversation ?</translation>
</message>
<message>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="429"/>
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="431"/>
<source>chat_list_delete_chat_popup_message</source>
<extracomment>This conversation and all its messages will be deleted. Do You want to continue ?</extracomment>
<translation>La conversation et tous ses messages seront supprimés. Souhaitez-vous continuer ?</translation>
@ -2504,98 +2504,98 @@ en bout. Seul votre correspondant peut les déchiffrer.</translation>
<translation>Création de la conversation en cours...</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="95"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="98"/>
<source>chat_dialog_delete_chat_title</source>
<extracomment>Supprimer la conversation ?</extracomment>
<translation>Supprimer la conversation ?</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="97"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="100"/>
<source>chat_dialog_delete_chat_message</source>
<extracomment>&quot;La conversation et tous ses messages seront supprimés.&quot;</extracomment>
<translation>La conversation et tous ses messages seront supprimés.</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="130"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="133"/>
<source>chat_list_title</source>
<extracomment>&quot;Conversations&quot;</extracomment>
<translation>Conversations</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="149"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="152"/>
<source>menu_mark_all_as_read</source>
<extracomment>&quot;mark all as read&quot;</extracomment>
<translation>Tout marquer comme lu</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="179"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="182"/>
<source>chat_search_in_history</source>
<extracomment>&quot;Rechercher une conversation&quot;</extracomment>
<translation>Rechercher une conversation</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="202"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="205"/>
<source>list_filter_no_result_found</source>
<extracomment>&quot;Aucun résultat&quot;</extracomment>
<translation>Aucun résultat</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="204"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="207"/>
<source>chat_list_empty_history</source>
<extracomment>&quot;Aucune conversation dans votre historique&quot;</extracomment>
<translation>Aucune conversation dans votre historique</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="282"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="285"/>
<source>chat_action_start_new_chat</source>
<extracomment>&quot;New chat&quot;</extracomment>
<translation>Nouvelle conversation</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="320"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="323"/>
<source>chat_start_group_chat_title</source>
<extracomment>&quot;Nouveau groupe&quot;</extracomment>
<translation>Nouveau groupe</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="322"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="325"/>
<source>chat_action_start_group_chat</source>
<extracomment>&quot;Créer&quot;</extracomment>
<translation>Créer</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="338"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="361"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="366"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="341"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="364"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="369"/>
<source>information_popup_error_title</source>
<translation>Erreur</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="340"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="343"/>
<source>information_popup_chat_creation_failed_message</source>
<extracomment>&quot;La création a échoué&quot;</extracomment>
<translation>La création a échoué</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="358"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="361"/>
<source>group_chat_error_must_have_name</source>
<extracomment>&quot;Un nom doit être donné au groupe</extracomment>
<translation>Un nom doit être donné au groupe</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="363"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="366"/>
<source>group_chat_error_no_participant</source>
<extracomment>&quot;Please select at least one participant</extracomment>
<translation>Veuillez sélectionner au moins un participant</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="368"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="371"/>
<source>group_call_error_not_connected</source>
<extracomment>&quot;Vous n&apos;etes pas connecté&quot;</extracomment>
<translation>Vous n&apos;êtes pas connecté</translation>
</message>
<message>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="374"/>
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="377"/>
<source>chat_creation_in_progress</source>
<extracomment>Creation de la conversation en cours </extracomment>
<translation>Création de la conversation en cours</translation>

View file

@ -275,6 +275,9 @@ signals:
void messageReceived(const std::shared_ptr<linphone::Core> &core,
const std::shared_ptr<linphone::ChatRoom> &room,
const std::shared_ptr<linphone::ChatMessage> &message);
void messageSent(const std::shared_ptr<linphone::Core> &core,
const std::shared_ptr<linphone::ChatRoom> &room,
const std::shared_ptr<const linphone::EventLog> &message);
void messagesReceived(const std::shared_ptr<linphone::Core> &core,
const std::shared_ptr<linphone::ChatRoom> &room,
const std::list<std::shared_ptr<linphone::ChatMessage>> &messages);

View file

@ -99,6 +99,8 @@ ListView {
if (index === -1 && force === true && chatGui) {
if (chatProxy.addChatInList(chatGui)) {
var index = chatProxy.findChatIndex(chatGui)
} else {
console.log("could not add chat in list !")
}
}
mainItem.currentIndex = index

View file

@ -44,6 +44,9 @@ AbstractMainPage {
UtilsCpp.showInformationPopup(qsTr("info_popup_error_title"),
//: Chat room creation failed !
qsTr("info_popup_chatroom_creation_failed"), false)
} else if (remoteChat.core.state === LinphoneEnums.ChatRoomState.Created) {
console.log("chat room state Created, open chat in right panel")
mainItem.selectedChatGui = remoteChat
}
}
}