mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
fix new chat selection
This commit is contained in:
parent
78e36bfa88
commit
36fbf44d42
10 changed files with 93 additions and 75 deletions
|
|
@ -218,7 +218,7 @@ bool ChatList::addChatInList(QSharedPointer<ChatCore> chatCore) {
|
|||
if (it == chatList.end()) {
|
||||
connectItem(chatCore);
|
||||
add(chatCore);
|
||||
emit chatAdded();
|
||||
emit chatAdded(chatCore);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public:
|
|||
signals:
|
||||
void lUpdate();
|
||||
void filterChanged(QString filter);
|
||||
void chatAdded();
|
||||
void chatAdded(QSharedPointer<ChatCore> chatCore);
|
||||
void chatUpdated();
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -45,7 +45,12 @@ void ChatProxy::setSourceModel(QAbstractItemModel *model) {
|
|||
if (newChatList) {
|
||||
connect(this, &ChatProxy::filterTextChanged, newChatList,
|
||||
[this, newChatList] { emit newChatList->filterChanged(getFilterText()); });
|
||||
connect(newChatList, &ChatList::chatAdded, this, [this] { invalidate(); });
|
||||
connect(newChatList, &ChatList::chatAdded, this, [this](QSharedPointer<ChatCore> chatCore) {
|
||||
if (chatCore) {
|
||||
invalidate();
|
||||
emit chatAdded(new ChatGui(chatCore));
|
||||
}
|
||||
});
|
||||
connect(newChatList, &ChatList::dataChanged, this, [this] { invalidate(); });
|
||||
}
|
||||
QSortFilterProxyModel::setSourceModel(newChatList);
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@ public:
|
|||
Q_INVOKABLE int findChatIndex(ChatGui *chatGui);
|
||||
Q_INVOKABLE bool addChatInList(ChatGui *chatGui);
|
||||
|
||||
signals:
|
||||
void chatAdded(ChatGui *chat);
|
||||
|
||||
protected:
|
||||
QSharedPointer<ChatList> mList;
|
||||
DECLARE_ABSTRACT_OBJECT
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ ChatGui *ParticipantInfoProxy::getChat() const {
|
|||
}
|
||||
|
||||
void ParticipantInfoProxy::setChat(ChatGui *chat) {
|
||||
lDebug() << "[ParticipantInfoProxy] set current chat " << chat;
|
||||
lDebug() << "[ParticipantInfoProxy] set current chat " << chat << (chat ? chat->mCore->getTitle() : "NULL");
|
||||
if (mChat != chat) {
|
||||
mChat = chat;
|
||||
mParticipants->setChatCore(chat ? chat->mCore : nullptr);
|
||||
|
|
|
|||
|
|
@ -2132,65 +2132,65 @@
|
|||
<context>
|
||||
<name>ChatListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="259"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="265"/>
|
||||
<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="261"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="267"/>
|
||||
<source>chat_message_draft_sending_text</source>
|
||||
<translation>Entwurf: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="406"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="412"/>
|
||||
<source>chat_room_delete</source>
|
||||
<extracomment>"Delete"</extracomment>
|
||||
<translation>Löschen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="345"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="351"/>
|
||||
<source>chat_room_mute</source>
|
||||
<translation>Stummschalten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="344"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="350"/>
|
||||
<source>chat_room_unmute</source>
|
||||
<extracomment>"Mute"</extracomment>
|
||||
<translation>Stummschaltung aufheben</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="358"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="364"/>
|
||||
<source>chat_room_mark_as_read</source>
|
||||
<extracomment>"Mark as read"</extracomment>
|
||||
<translation>Als gelesen markieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="377"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="383"/>
|
||||
<source>chat_room_leave</source>
|
||||
<extracomment>"leave"</extracomment>
|
||||
<translation>Verlassen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="383"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="389"/>
|
||||
<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="385"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="391"/>
|
||||
<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="412"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="418"/>
|
||||
<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="414"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="420"/>
|
||||
<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>
|
||||
|
|
@ -2606,32 +2606,32 @@ Stellen Sie sicher, dass Sie keine sensiblen Informationen teilen!</translation>
|
|||
<translation>Keine Chats in der Historie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="275"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="279"/>
|
||||
<source>chat_action_start_new_chat</source>
|
||||
<extracomment>"New chat"</extracomment>
|
||||
<translation>Neuer Chat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="313"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="317"/>
|
||||
<source>chat_start_group_chat_title</source>
|
||||
<extracomment>"Nouveau groupe"</extracomment>
|
||||
<translation>Neuer Gruppenchat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="315"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="319"/>
|
||||
<source>chat_action_start_group_chat</source>
|
||||
<extracomment>"Créer"</extracomment>
|
||||
<translation>Erstellen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="331"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="354"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="359"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="335"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="358"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="363"/>
|
||||
<source>information_popup_error_title</source>
|
||||
<translation>Fehler</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="333"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="337"/>
|
||||
<source>information_popup_chat_creation_failed_message</source>
|
||||
<extracomment>"La création a échoué"</extracomment>
|
||||
<translation>Erstellen fehlgeschlagen</translation>
|
||||
|
|
@ -2642,25 +2642,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="351"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="355"/>
|
||||
<source>group_chat_error_must_have_name</source>
|
||||
<extracomment>"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="356"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="360"/>
|
||||
<source>group_chat_error_no_participant</source>
|
||||
<extracomment>"Please select at least one participant</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="361"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="365"/>
|
||||
<source>group_call_error_not_connected</source>
|
||||
<extracomment>"Vous n'etes pas connecté"</extracomment>
|
||||
<translation>Sie sind nicht verbunden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="367"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="371"/>
|
||||
<source>chat_creation_in_progress</source>
|
||||
<extracomment>Creation de la conversation en cours …</extracomment>
|
||||
<translation>Chat-Erstellung ausstehend…</translation>
|
||||
|
|
|
|||
|
|
@ -2095,65 +2095,65 @@
|
|||
<context>
|
||||
<name>ChatListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="259"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="265"/>
|
||||
<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="261"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="267"/>
|
||||
<source>chat_message_draft_sending_text</source>
|
||||
<translation>Draft : %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="406"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="412"/>
|
||||
<source>chat_room_delete</source>
|
||||
<extracomment>"Delete"</extracomment>
|
||||
<translation>Delete</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="345"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="351"/>
|
||||
<source>chat_room_mute</source>
|
||||
<translation>Mute</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="344"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="350"/>
|
||||
<source>chat_room_unmute</source>
|
||||
<extracomment>"Mute"</extracomment>
|
||||
<translation>Unmute</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="358"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="364"/>
|
||||
<source>chat_room_mark_as_read</source>
|
||||
<extracomment>"Mark as read"</extracomment>
|
||||
<translation>Mark as read</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="377"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="383"/>
|
||||
<source>chat_room_leave</source>
|
||||
<extracomment>"leave"</extracomment>
|
||||
<translation>Leave</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="383"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="389"/>
|
||||
<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="385"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="391"/>
|
||||
<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="412"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="418"/>
|
||||
<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="414"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="420"/>
|
||||
<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>
|
||||
|
|
@ -2564,56 +2564,56 @@ Only your correspondent can decrypt them.</translation>
|
|||
<translation>No conversation in history</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="275"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="279"/>
|
||||
<source>chat_action_start_new_chat</source>
|
||||
<extracomment>"New chat"</extracomment>
|
||||
<translation>New conversation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="313"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="317"/>
|
||||
<source>chat_start_group_chat_title</source>
|
||||
<extracomment>"Nouveau groupe"</extracomment>
|
||||
<translation>New group</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="315"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="319"/>
|
||||
<source>chat_action_start_group_chat</source>
|
||||
<extracomment>"Créer"</extracomment>
|
||||
<translation>Create</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="331"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="354"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="359"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="335"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="358"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="363"/>
|
||||
<source>information_popup_error_title</source>
|
||||
<translation>Error</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="333"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="337"/>
|
||||
<source>information_popup_chat_creation_failed_message</source>
|
||||
<extracomment>"La création a échoué"</extracomment>
|
||||
<translation>Creation failed</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="351"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="355"/>
|
||||
<source>group_chat_error_must_have_name</source>
|
||||
<extracomment>"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="356"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="360"/>
|
||||
<source>group_chat_error_no_participant</source>
|
||||
<extracomment>"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="361"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="365"/>
|
||||
<source>group_call_error_not_connected</source>
|
||||
<extracomment>"Vous n'etes pas connecté"</extracomment>
|
||||
<translation>You are not connected</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="367"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="371"/>
|
||||
<source>chat_creation_in_progress</source>
|
||||
<extracomment>Creation de la conversation en cours …</extracomment>
|
||||
<translation>Chat creation pending…</translation>
|
||||
|
|
|
|||
|
|
@ -2090,65 +2090,65 @@
|
|||
<context>
|
||||
<name>ChatListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="259"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="265"/>
|
||||
<source>chat_message_is_writing_info</source>
|
||||
<extracomment>%1 is writing…</extracomment>
|
||||
<translation>%1 est en train d'écrire…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="261"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="267"/>
|
||||
<source>chat_message_draft_sending_text</source>
|
||||
<translation>Brouillon : %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="406"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="412"/>
|
||||
<source>chat_room_delete</source>
|
||||
<extracomment>"Delete"</extracomment>
|
||||
<translation>Supprimer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="345"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="351"/>
|
||||
<source>chat_room_mute</source>
|
||||
<translation>Mettre en sourdine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="344"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="350"/>
|
||||
<source>chat_room_unmute</source>
|
||||
<extracomment>"Mute"</extracomment>
|
||||
<translation>Enlever la sourdine </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="358"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="364"/>
|
||||
<source>chat_room_mark_as_read</source>
|
||||
<extracomment>"Mark as read"</extracomment>
|
||||
<translation>Marquer comme lu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="377"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="383"/>
|
||||
<source>chat_room_leave</source>
|
||||
<extracomment>"leave"</extracomment>
|
||||
<translation>Quitter la conversation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="383"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="389"/>
|
||||
<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="385"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="391"/>
|
||||
<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="412"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="418"/>
|
||||
<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="414"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="420"/>
|
||||
<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>
|
||||
|
|
@ -2559,56 +2559,56 @@ en bout. Seul votre correspondant peut les déchiffrer.</translation>
|
|||
<translation>Aucune conversation dans votre historique</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="275"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="279"/>
|
||||
<source>chat_action_start_new_chat</source>
|
||||
<extracomment>"New chat"</extracomment>
|
||||
<translation>Nouvelle conversation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="313"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="317"/>
|
||||
<source>chat_start_group_chat_title</source>
|
||||
<extracomment>"Nouveau groupe"</extracomment>
|
||||
<translation>Nouveau groupe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="315"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="319"/>
|
||||
<source>chat_action_start_group_chat</source>
|
||||
<extracomment>"Créer"</extracomment>
|
||||
<translation>Créer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="331"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="354"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="359"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="335"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="358"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="363"/>
|
||||
<source>information_popup_error_title</source>
|
||||
<translation>Erreur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="333"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="337"/>
|
||||
<source>information_popup_chat_creation_failed_message</source>
|
||||
<extracomment>"La création a échoué"</extracomment>
|
||||
<translation>La création a échoué</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="351"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="355"/>
|
||||
<source>group_chat_error_must_have_name</source>
|
||||
<extracomment>"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="356"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="360"/>
|
||||
<source>group_chat_error_no_participant</source>
|
||||
<extracomment>"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="361"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="365"/>
|
||||
<source>group_call_error_not_connected</source>
|
||||
<extracomment>"Vous n'etes pas connecté"</extracomment>
|
||||
<translation>Vous n'êtes pas connecté</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="367"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="371"/>
|
||||
<source>chat_creation_in_progress</source>
|
||||
<extracomment>Creation de la conversation en cours …</extracomment>
|
||||
<translation>Création de la conversation en cours…</translation>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ ListView {
|
|||
}
|
||||
onModelAboutToBeReset: {
|
||||
loading = true
|
||||
|
||||
}
|
||||
onModelReset: {
|
||||
loading = false
|
||||
|
|
@ -56,8 +55,13 @@ ListView {
|
|||
else if (mainItem.chatToSelect) {
|
||||
selectChat(mainItem.chatToSelect)
|
||||
mainItem.chatToSelect = null
|
||||
} else {
|
||||
selectChat(mainItem.currentChatGui)
|
||||
}
|
||||
}
|
||||
onChatAdded: (chat) => {
|
||||
mainItem.chatToSelect = chat
|
||||
}
|
||||
onRowsRemoved: {
|
||||
var index = mainItem.currentIndex
|
||||
mainItem.currentIndex = -1
|
||||
|
|
@ -83,7 +87,9 @@ ListView {
|
|||
|
||||
function selectChat(chatGui, force) {
|
||||
var index = chatProxy.findChatIndex(chatGui)
|
||||
// force adding chat to list if not in list for now
|
||||
// force adding chat to list if it already exists
|
||||
// but has not been added to the list yet because
|
||||
// it is empty and hide_empty_chatrooms is set
|
||||
if (index === -1 && force === true && chatGui) {
|
||||
if (chatProxy.addChatInList(chatGui)) {
|
||||
var index = chatProxy.findChatIndex(chatGui)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ AbstractMainPage {
|
|||
property var selectedChatGui: null
|
||||
property string remoteAddress
|
||||
onRemoteAddressChanged: console.log("ChatPage : remote address changed :", remoteAddress)
|
||||
property var remoteChatObj: UtilsCpp.getChatForAddress(remoteAddress)
|
||||
property var remoteChatObj: remoteAddress.length > 0 ? UtilsCpp.getChatForAddress(remoteAddress) : null
|
||||
property var remoteChat: remoteChatObj ? remoteChatObj.value : null
|
||||
|
||||
signal openChatRequested(ChatGui chat)
|
||||
|
|
@ -46,8 +46,6 @@ 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) {
|
||||
openChatRequested(remoteChat)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -78,6 +76,7 @@ AbstractMainPage {
|
|||
rightPanelStackView.visible: false//listStackView.currentItem && listStackView.currentItem.objectName === "chatListItem" && selectedChatGui !== null
|
||||
|
||||
onNoItemButtonPressed: goToNewChat()
|
||||
signal newChatItemOpen()
|
||||
|
||||
showDefaultItem: listStackView.currentItem
|
||||
&& listStackView.currentItem.objectName == "chatListItem"
|
||||
|
|
@ -88,6 +87,7 @@ AbstractMainPage {
|
|||
if (listStackView.currentItem
|
||||
&& listStackView.currentItem.objectName != "newChatItem")
|
||||
listStackView.push(newChatItem)
|
||||
newChatItemOpen()
|
||||
}
|
||||
|
||||
Dialog {
|
||||
|
|
@ -226,6 +226,10 @@ AbstractMainPage {
|
|||
function onOpenChatRequested(chat) {
|
||||
chatListView.chatToSelect = chat
|
||||
}
|
||||
function onNewChatItemOpen() {
|
||||
// reset index to clear right panel when opening new conversation
|
||||
chatListView.currentIndex = -1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue