fix sending area wiped everytime we receive a message : set a sending text in chatcore (also allows to write something to someone and let it unfinished for later)
fix chat message insertion in list
This commit is contained in:
parent
7abfe4508c
commit
0614520e5a
14 changed files with 219 additions and 372 deletions
|
|
@ -257,6 +257,17 @@ void ChatCore::setTitle(QString title) {
|
|||
}
|
||||
}
|
||||
|
||||
QString ChatCore::getSendingText() const {
|
||||
return mSendingText;
|
||||
}
|
||||
|
||||
void ChatCore::setSendingText(const QString &text) {
|
||||
if (mSendingText != text) {
|
||||
mSendingText = text;
|
||||
emit sendingTextChanged(text);
|
||||
}
|
||||
}
|
||||
|
||||
bool ChatCore::isGroupChat() const {
|
||||
return mIsGroupChat;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ public:
|
|||
Q_PROPERTY(bool isGroupChat READ isGroupChat CONSTANT)
|
||||
Q_PROPERTY(bool isEncrypted READ isEncrypted CONSTANT)
|
||||
Q_PROPERTY(bool isReadOnly READ getIsReadOnly WRITE setIsReadOnly NOTIFY readOnlyChanged)
|
||||
Q_PROPERTY(QString sendingText READ getSendingText WRITE setSendingText NOTIFY sendingTextChanged)
|
||||
|
||||
// Should be call from model Thread. Will be automatically in App thread after initialization
|
||||
static QSharedPointer<ChatCore> create(const std::shared_ptr<linphone::ChatRoom> &chatRoom);
|
||||
|
|
@ -70,6 +71,9 @@ public:
|
|||
|
||||
QString getIdentifier() const;
|
||||
|
||||
QString getSendingText() const;
|
||||
void setSendingText(const QString &text);
|
||||
|
||||
ChatMessageGui *getLastMessage() const;
|
||||
QString getLastMessageText() const;
|
||||
|
||||
|
|
@ -122,6 +126,7 @@ signals:
|
|||
void composingUserChanged();
|
||||
void chatRoomStateChanged();
|
||||
void readOnlyChanged();
|
||||
void sendingTextChanged(QString text);
|
||||
|
||||
void lDeleteMessage();
|
||||
void lDelete();
|
||||
|
|
@ -142,6 +147,7 @@ private:
|
|||
QString mTitle;
|
||||
QString mIdentifier;
|
||||
QString mAvatarUri;
|
||||
QString mSendingText;
|
||||
int mUnreadMessagesCount;
|
||||
QString mComposingName;
|
||||
QString mComposingAddress;
|
||||
|
|
|
|||
|
|
@ -74,10 +74,9 @@ void ChatMessageList::setChatCore(QSharedPointer<ChatCore> core) {
|
|||
[this](QList<QSharedPointer<ChatMessageCore>> list) {
|
||||
auto chatList = getSharedList<ChatMessageCore>();
|
||||
for (auto &message : list) {
|
||||
auto it = std::find_if(chatList.begin(), chatList.end(),
|
||||
[message](const QSharedPointer<ChatMessageCore> item) {
|
||||
return item->getMessageId() == message->getMessageId();
|
||||
});
|
||||
auto it = std::find_if(
|
||||
chatList.begin(), chatList.end(),
|
||||
[message](const QSharedPointer<ChatMessageCore> item) { return item == message; });
|
||||
if (it == chatList.end()) {
|
||||
add(message);
|
||||
int index;
|
||||
|
|
|
|||
|
|
@ -809,25 +809,25 @@
|
|||
<translation type="vanished">Offline</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="147"/>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="149"/>
|
||||
<source>meeting_info_join_title</source>
|
||||
<extracomment>"Rejoindre la réunion"</extracomment>
|
||||
<translation>Besprechung beitreten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="165"/>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="167"/>
|
||||
<source>contact_call_action</source>
|
||||
<extracomment>"Appel"</extracomment>
|
||||
<translation>Anrufen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="179"/>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="181"/>
|
||||
<source>contact_message_action</source>
|
||||
<extracomment>"Message"</extracomment>
|
||||
<translation>Nachricht</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="195"/>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="197"/>
|
||||
<source>contact_video_call_action</source>
|
||||
<extracomment>"Appel Video"</extracomment>
|
||||
<translation>Videoanruf</translation>
|
||||
|
|
@ -1712,13 +1712,13 @@
|
|||
<context>
|
||||
<name>ChatCore</name>
|
||||
<message>
|
||||
<location filename="../../core/chat/ChatCore.cpp" line="114"/>
|
||||
<location filename="../../core/chat/ChatCore.cpp" line="117"/>
|
||||
<source>info_toast_deleted_title</source>
|
||||
<extracomment>Deleted</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/chat/ChatCore.cpp" line="116"/>
|
||||
<location filename="../../core/chat/ChatCore.cpp" line="119"/>
|
||||
<source>info_toast_deleted_message_history</source>
|
||||
<extracomment>Message history has been deleted</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
|
|
@ -1727,19 +1727,31 @@
|
|||
<context>
|
||||
<name>ChatListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="260"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="217"/>
|
||||
<source>chat_message_is_writing_info</source>
|
||||
<extracomment>%1 is writing…</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="227"/>
|
||||
<source>chat_message_draft_sending_text</source>
|
||||
<extracomment>Draft : %1</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="281"/>
|
||||
<source>chat_room_delete</source>
|
||||
<extracomment>"Supprimer"</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="266"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="287"/>
|
||||
<source>chat_list_delete_chat_popup_title</source>
|
||||
<extracomment>Delete the chat ?</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="268"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="289"/>
|
||||
<source>chat_list_delete_chat_popup_message</source>
|
||||
<extracomment>This chat and all its messages will be deleted. Do You want to continue ?</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
|
|
@ -1748,25 +1760,25 @@
|
|||
<context>
|
||||
<name>ChatMessage</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="267"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="266"/>
|
||||
<source>chat_message_copy</source>
|
||||
<extracomment>"Copy"</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="275"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="274"/>
|
||||
<source>chat_message_copied_to_clipboard_title</source>
|
||||
<extracomment>Copied</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="277"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="276"/>
|
||||
<source>chat_message_copied_to_clipboard_toast</source>
|
||||
<extracomment>"to clipboard"</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="283"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="282"/>
|
||||
<source>chat_message_delete</source>
|
||||
<extracomment>"Delete"</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
|
|
@ -1834,20 +1846,20 @@
|
|||
<context>
|
||||
<name>ChatMessagesListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="89"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="88"/>
|
||||
<source>chat_message_list_encrypted_header_title</source>
|
||||
<extracomment>End to end encrypted chat</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="99"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="98"/>
|
||||
<source>chat_message_list_encrypted_header_message</source>
|
||||
<extracomment>Les messages de cette conversation sont chiffrés de bout
|
||||
en bout. Seul votre correspondant peut les déchiffrer.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="160"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="155"/>
|
||||
<source>chat_message_is_writing_info</source>
|
||||
<extracomment>%1 is writing…</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
|
|
@ -4294,31 +4306,49 @@ Pour les activer dans un projet commercial, merci de nous contacter.</source>
|
|||
<context>
|
||||
<name>SelectedChatView</name>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="227"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="229"/>
|
||||
<source>chat_view_send_area_placeholder_text</source>
|
||||
<extracomment>Say something… : placeholder text for sending message text area</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="302"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="306"/>
|
||||
<source>chat_view_detail_other_actions_title</source>
|
||||
<extracomment>Other actions</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="320"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="324"/>
|
||||
<source>chat_view_detail_leave_room_toast_button</source>
|
||||
<extracomment>"Leave Chat Room"</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="328"/>
|
||||
<source>chat_view_detail_leave_room_toast_title</source>
|
||||
<extracomment>Leave Chat Room ?</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="330"/>
|
||||
<source>chat_view_detail_leave_room_toast_message</source>
|
||||
<extracomment>All the messages will be removed from the chat room. Do you want to continue ?</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="345"/>
|
||||
<source>chat_view_detail_delete_history_button</source>
|
||||
<extracomment>"Delete history"</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="323"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="348"/>
|
||||
<source>chat_view_detail_delete_history_toast_title</source>
|
||||
<extracomment>Delete history ?</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="325"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="350"/>
|
||||
<source>chat_view_detail_delete_history_toast_message</source>
|
||||
<extracomment>All the messages will be removed from the chat room. Do you want to continue ?</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
|
|
|
|||
|
|
@ -397,9 +397,9 @@
|
|||
<source>add_participant_selected_count</source>
|
||||
<comment>0</comment>
|
||||
<extracomment>"%n participant(s) sélectionné(s)"</extracomment>
|
||||
<translation type="unfinished">
|
||||
<numerusform>1 selected participant</numerusform>
|
||||
<numerusform>%n selected participants</numerusform>
|
||||
<translation>
|
||||
<numerusform>%1 selected participant</numerusform>
|
||||
<numerusform>%1 selected participants</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
|
|
@ -789,25 +789,25 @@
|
|||
<context>
|
||||
<name>CallHistoryLayout</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="147"/>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="149"/>
|
||||
<source>meeting_info_join_title</source>
|
||||
<extracomment>"Rejoindre la réunion"</extracomment>
|
||||
<translation>Join meeting</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="165"/>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="167"/>
|
||||
<source>contact_call_action</source>
|
||||
<extracomment>"Appel"</extracomment>
|
||||
<translation>Call</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="179"/>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="181"/>
|
||||
<source>contact_message_action</source>
|
||||
<extracomment>"Message"</extracomment>
|
||||
<translation>Message</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="195"/>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="197"/>
|
||||
<source>contact_video_call_action</source>
|
||||
<extracomment>"Appel Video"</extracomment>
|
||||
<translation>Video call</translation>
|
||||
|
|
@ -1412,8 +1412,8 @@
|
|||
<location filename="../../view/Page/Window/Call/CallsWindow.qml" line="1004"/>
|
||||
<source>group_call_participant_selected</source>
|
||||
<translation>
|
||||
<numerusform>1 selected participant</numerusform>
|
||||
<numerusform>%n selected participants</numerusform>
|
||||
<numerusform>%1 selected participant</numerusform>
|
||||
<numerusform>%1 selected participants</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
|
|
@ -1674,13 +1674,13 @@
|
|||
<context>
|
||||
<name>ChatCore</name>
|
||||
<message>
|
||||
<location filename="../../core/chat/ChatCore.cpp" line="114"/>
|
||||
<location filename="../../core/chat/ChatCore.cpp" line="117"/>
|
||||
<source>info_toast_deleted_title</source>
|
||||
<extracomment>Deleted</extracomment>
|
||||
<translation>Deleted</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/chat/ChatCore.cpp" line="116"/>
|
||||
<location filename="../../core/chat/ChatCore.cpp" line="119"/>
|
||||
<source>info_toast_deleted_message_history</source>
|
||||
<extracomment>Message history has been deleted</extracomment>
|
||||
<translation>Message history has been deleted</translation>
|
||||
|
|
@ -1689,19 +1689,31 @@
|
|||
<context>
|
||||
<name>ChatListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="260"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="217"/>
|
||||
<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="227"/>
|
||||
<source>chat_message_draft_sending_text</source>
|
||||
<extracomment>Draft : %1</extracomment>
|
||||
<translation>Draft : %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="281"/>
|
||||
<source>chat_room_delete</source>
|
||||
<extracomment>"Supprimer"</extracomment>
|
||||
<translation>Delete</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="266"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="287"/>
|
||||
<source>chat_list_delete_chat_popup_title</source>
|
||||
<extracomment>Delete the chat ?</extracomment>
|
||||
<translation>Delete the chat ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="268"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="289"/>
|
||||
<source>chat_list_delete_chat_popup_message</source>
|
||||
<extracomment>This chat and all its messages will be deleted. Do You want to continue ?</extracomment>
|
||||
<translation>This chat and all its messages will be deleted. Do You want to continue ?</translation>
|
||||
|
|
@ -1710,25 +1722,25 @@
|
|||
<context>
|
||||
<name>ChatMessage</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="267"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="266"/>
|
||||
<source>chat_message_copy</source>
|
||||
<extracomment>"Copy"</extracomment>
|
||||
<translation>Copy</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="275"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="274"/>
|
||||
<source>chat_message_copied_to_clipboard_title</source>
|
||||
<extracomment>Copied</extracomment>
|
||||
<translation>Copied</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="277"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="276"/>
|
||||
<source>chat_message_copied_to_clipboard_toast</source>
|
||||
<extracomment>"to clipboard"</extracomment>
|
||||
<translation>in clipboard</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="283"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="282"/>
|
||||
<source>chat_message_delete</source>
|
||||
<extracomment>"Delete"</extracomment>
|
||||
<translation>Delete</translation>
|
||||
|
|
@ -1796,13 +1808,13 @@
|
|||
<context>
|
||||
<name>ChatMessagesListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="89"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="88"/>
|
||||
<source>chat_message_list_encrypted_header_title</source>
|
||||
<extracomment>End to end encrypted chat</extracomment>
|
||||
<translation>End to end encrypted chat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="99"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="98"/>
|
||||
<source>chat_message_list_encrypted_header_message</source>
|
||||
<extracomment>Les messages de cette conversation sont chiffrés de bout
|
||||
en bout. Seul votre correspondant peut les déchiffrer.</extracomment>
|
||||
|
|
@ -1810,7 +1822,7 @@
|
|||
Only your correspondent can decrypt them.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="160"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="155"/>
|
||||
<source>chat_message_is_writing_info</source>
|
||||
<extracomment>%1 is writing…</extracomment>
|
||||
<translation>%1 is writing…</translation>
|
||||
|
|
@ -3453,8 +3465,8 @@ Only your correspondent can decrypt them.</translation>
|
|||
<source>group_call_participant_selected</source>
|
||||
<extracomment>"%n participant(s) sélectionné(s)"</extracomment>
|
||||
<translation>
|
||||
<numerusform>1 selected participant</numerusform>
|
||||
<numerusform>%n selected participants</numerusform>
|
||||
<numerusform>%1 selected participant</numerusform>
|
||||
<numerusform>%1 selected participants</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
|
|
@ -4213,53 +4225,53 @@ To enable them in a commercial project, please contact us.</translation>
|
|||
<translation type="obsolete">Other actions</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="227"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="229"/>
|
||||
<source>chat_view_send_area_placeholder_text</source>
|
||||
<extracomment>Say something… : placeholder text for sending message text area</extracomment>
|
||||
<translation>Say something…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="302"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="306"/>
|
||||
<source>chat_view_detail_other_actions_title</source>
|
||||
<extracomment>Other actions</extracomment>
|
||||
<translation>Other actions</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="320"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="345"/>
|
||||
<source>chat_view_detail_delete_history_button</source>
|
||||
<extracomment>"Delete history"</extracomment>
|
||||
<translation>Delete history</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="323"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="348"/>
|
||||
<source>chat_view_detail_delete_history_toast_title</source>
|
||||
<extracomment>Delete history ?</extracomment>
|
||||
<translation>Delete history ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="325"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="350"/>
|
||||
<source>chat_view_detail_delete_history_toast_message</source>
|
||||
<extracomment>All the messages will be removed from the chat room. Do you want to continue ?</extracomment>
|
||||
<translation>All the messages will be removed from the chat room. Do you want to continue ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="292"/>
|
||||
<source>chat_view_detail_leave_room_toast_button</source>
|
||||
<extracomment>"Leave chat room"</extracomment>
|
||||
<translation>Leave chat room</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="295"/>
|
||||
<source>chat_view_detail_leave_room_toast_title</source>
|
||||
<extracomment>Leave chat room ?</extracomment>
|
||||
<translation>Leave chat room ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="297"/>
|
||||
<source>chat_view_detail_leave_room_toast_message</source>
|
||||
<extracomment>You will not be able to send or receive messages in this room anymore, leave ?</extracomment>
|
||||
<translation>You will not be able to send or receive messages in this room anymore, leave ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="324"/>
|
||||
<source>chat_view_detail_leave_room_toast_button</source>
|
||||
<extracomment>"Leave Chat Room"</extracomment>
|
||||
<translation>Leave chat room</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="328"/>
|
||||
<source>chat_view_detail_leave_room_toast_title</source>
|
||||
<extracomment>Leave Chat Room ?</extracomment>
|
||||
<translation>Leave chat room ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="330"/>
|
||||
<source>chat_view_detail_leave_room_toast_message</source>
|
||||
<extracomment>All the messages will be removed from the chat room. Do you want to continue ?</extracomment>
|
||||
<translation>You will not be able to send or receive messages in this room anymore, leave ?</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsPage</name>
|
||||
|
|
@ -4450,7 +4462,7 @@ Failed to create 1-1 conversation with %1 !</extracomment>
|
|||
<extracomment>%n an(s)</extracomment>
|
||||
<translation>
|
||||
<numerusform>one year</numerusform>
|
||||
<numerusform>%n years</numerusform>
|
||||
<numerusform>%1 years</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
|
|
@ -4459,7 +4471,7 @@ Failed to create 1-1 conversation with %1 !</extracomment>
|
|||
<extracomment>"%n mois"</extracomment>
|
||||
<translation>
|
||||
<numerusform>one month</numerusform>
|
||||
<numerusform>%n months</numerusform>
|
||||
<numerusform>%1 months</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
|
|
@ -4468,7 +4480,7 @@ Failed to create 1-1 conversation with %1 !</extracomment>
|
|||
<extracomment>%n semaine(s)</extracomment>
|
||||
<translation>
|
||||
<numerusform>one week</numerusform>
|
||||
<numerusform>%n weeks</numerusform>
|
||||
<numerusform>%1 weeks</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
|
|
@ -4477,7 +4489,7 @@ Failed to create 1-1 conversation with %1 !</extracomment>
|
|||
<extracomment>%n jour(s)</extracomment>
|
||||
<translation>
|
||||
<numerusform>one day</numerusform>
|
||||
<numerusform>%n days</numerusform>
|
||||
<numerusform>%1 days</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
|
|
@ -397,7 +397,7 @@
|
|||
<source>add_participant_selected_count</source>
|
||||
<comment>0</comment>
|
||||
<extracomment>"%n participant(s) sélectionné(s)"</extracomment>
|
||||
<translation type="unfinished">
|
||||
<translation>
|
||||
<numerusform>%1 participant sélectionné</numerusform>
|
||||
<numerusform>%1 participants sélectionnés</numerusform>
|
||||
</translation>
|
||||
|
|
@ -789,25 +789,25 @@
|
|||
<context>
|
||||
<name>CallHistoryLayout</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="147"/>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="149"/>
|
||||
<source>meeting_info_join_title</source>
|
||||
<extracomment>"Rejoindre la réunion"</extracomment>
|
||||
<translation>Rejoindre la réunion</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="165"/>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="167"/>
|
||||
<source>contact_call_action</source>
|
||||
<extracomment>"Appel"</extracomment>
|
||||
<translation>Appel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="179"/>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="181"/>
|
||||
<source>contact_message_action</source>
|
||||
<extracomment>"Message"</extracomment>
|
||||
<translation>Message</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="195"/>
|
||||
<location filename="../../view/Control/Container/Call/CallHistoryLayout.qml" line="197"/>
|
||||
<source>contact_video_call_action</source>
|
||||
<extracomment>"Appel Video"</extracomment>
|
||||
<translation>Appel Vidéo</translation>
|
||||
|
|
@ -1684,13 +1684,13 @@
|
|||
<context>
|
||||
<name>ChatCore</name>
|
||||
<message>
|
||||
<location filename="../../core/chat/ChatCore.cpp" line="114"/>
|
||||
<location filename="../../core/chat/ChatCore.cpp" line="117"/>
|
||||
<source>info_toast_deleted_title</source>
|
||||
<extracomment>Deleted</extracomment>
|
||||
<translation>Supprimé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../core/chat/ChatCore.cpp" line="116"/>
|
||||
<location filename="../../core/chat/ChatCore.cpp" line="119"/>
|
||||
<source>info_toast_deleted_message_history</source>
|
||||
<extracomment>Message history has been deleted</extracomment>
|
||||
<translation>L'historique des messages a été supprimé</translation>
|
||||
|
|
@ -1699,19 +1699,31 @@
|
|||
<context>
|
||||
<name>ChatListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="260"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="217"/>
|
||||
<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="227"/>
|
||||
<source>chat_message_draft_sending_text</source>
|
||||
<extracomment>Draft : %1</extracomment>
|
||||
<translation>Brouillon : %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="281"/>
|
||||
<source>chat_room_delete</source>
|
||||
<extracomment>"Supprimer"</extracomment>
|
||||
<translation>Supprimer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="266"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="287"/>
|
||||
<source>chat_list_delete_chat_popup_title</source>
|
||||
<extracomment>Delete the chat ?</extracomment>
|
||||
<translation>Supprimer la conversation ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="268"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="289"/>
|
||||
<source>chat_list_delete_chat_popup_message</source>
|
||||
<extracomment>This chat 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>
|
||||
|
|
@ -1720,25 +1732,25 @@
|
|||
<context>
|
||||
<name>ChatMessage</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="267"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="266"/>
|
||||
<source>chat_message_copy</source>
|
||||
<extracomment>"Copy"</extracomment>
|
||||
<translation>Copier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="275"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="274"/>
|
||||
<source>chat_message_copied_to_clipboard_title</source>
|
||||
<extracomment>Copied</extracomment>
|
||||
<translation>Copié</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="277"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="276"/>
|
||||
<source>chat_message_copied_to_clipboard_toast</source>
|
||||
<extracomment>"to clipboard"</extracomment>
|
||||
<translation>dans le presse-papiers</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="283"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessage.qml" line="282"/>
|
||||
<source>chat_message_delete</source>
|
||||
<extracomment>"Delete"</extracomment>
|
||||
<translation>Supprimer</translation>
|
||||
|
|
@ -1806,13 +1818,13 @@
|
|||
<context>
|
||||
<name>ChatMessagesListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="89"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="88"/>
|
||||
<source>chat_message_list_encrypted_header_title</source>
|
||||
<extracomment>End to end encrypted chat</extracomment>
|
||||
<translation>Conversation chiffrée de bout en bout</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="99"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="98"/>
|
||||
<source>chat_message_list_encrypted_header_message</source>
|
||||
<extracomment>Les messages de cette conversation sont chiffrés de bout
|
||||
en bout. Seul votre correspondant peut les déchiffrer.</extracomment>
|
||||
|
|
@ -1820,7 +1832,7 @@
|
|||
en bout. Seul votre correspondant peut les déchiffrer.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="160"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="155"/>
|
||||
<source>chat_message_is_writing_info</source>
|
||||
<extracomment>%1 is writing…</extracomment>
|
||||
<translation>%1 est en train d'écrire…</translation>
|
||||
|
|
@ -4215,53 +4227,53 @@ Pour les activer dans un projet commercial, merci de nous contacter.</translatio
|
|||
<context>
|
||||
<name>SelectedChatView</name>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="227"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="229"/>
|
||||
<source>chat_view_send_area_placeholder_text</source>
|
||||
<extracomment>Say something… : placeholder text for sending message text area</extracomment>
|
||||
<translation>Dites quelque chose…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="302"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="306"/>
|
||||
<source>chat_view_detail_other_actions_title</source>
|
||||
<extracomment>Other actions</extracomment>
|
||||
<translation>Autres actions</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="320"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="345"/>
|
||||
<source>chat_view_detail_delete_history_button</source>
|
||||
<extracomment>"Delete history"</extracomment>
|
||||
<translation>Supprimer l'historique</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="323"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="348"/>
|
||||
<source>chat_view_detail_delete_history_toast_title</source>
|
||||
<extracomment>Delete history ?</extracomment>
|
||||
<translation>Supprimer l'historique ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="325"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="350"/>
|
||||
<source>chat_view_detail_delete_history_toast_message</source>
|
||||
<extracomment>All the messages will be removed from the chat room. Do you want to continue ?</extracomment>
|
||||
<translation>Tous les messages seront supprimés. Souhaitez-vous continuer ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="292"/>
|
||||
<source>chat_view_detail_leave_room_toast_button</source>
|
||||
<extracomment>"Leave chat room"</extracomment>
|
||||
<translation>Quitter la conversation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="295"/>
|
||||
<source>chat_view_detail_leave_room_toast_title</source>
|
||||
<extracomment>Leave chat room ?</extracomment>
|
||||
<translation>Quitter la conversation ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="297"/>
|
||||
<source>chat_view_detail_leave_room_toast_message</source>
|
||||
<extracomment>You will not be able to send or receive messages in this room anymore, leave ?</extracomment>
|
||||
<translation>Vous ne recevrez ni pourrez envoyer des messages dans cette conversation, quitter ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="324"/>
|
||||
<source>chat_view_detail_leave_room_toast_button</source>
|
||||
<extracomment>"Leave Chat Room"</extracomment>
|
||||
<translation>Quitter la conversation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="328"/>
|
||||
<source>chat_view_detail_leave_room_toast_title</source>
|
||||
<extracomment>Leave Chat Room ?</extracomment>
|
||||
<translation>Quitter la conversation ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="330"/>
|
||||
<source>chat_view_detail_leave_room_toast_message</source>
|
||||
<extracomment>All the messages will be removed from the chat room. Do you want to continue ?</extracomment>
|
||||
<translation>Vous ne recevrez ni pourrez envoyer des messages dans cette conversation, quitter ?</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsPage</name>
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ list(APPEND _LINPHONEAPP_QML_FILES
|
|||
view/Control/Display/Call/CallListView.qml
|
||||
view/Control/Display/Call/CallHistoryListView.qml
|
||||
view/Control/Display/Call/CallStatistics.qml
|
||||
view/Control/Display/Chat/Emoji/EmojiPicker.qml
|
||||
view/Control/Display/Chat/ChatListView.qml
|
||||
view/Control/Display/Chat/ChatMessage.qml
|
||||
view/Control/Display/Chat/ChatMessageInvitationBubble.qml
|
||||
|
|
@ -65,7 +66,6 @@ list(APPEND _LINPHONEAPP_QML_FILES
|
|||
view/Control/Display/Contact/ContactListView.qml
|
||||
view/Control/Display/Contact/AllContactListView.qml
|
||||
view/Control/Display/Contact/Voicemail.qml
|
||||
view/Control/Display/Conversation/Emoji/EmojiPicker.qml
|
||||
view/Control/Display/Meeting/MeetingListView.qml
|
||||
view/Control/Display/Participant/ParticipantDeviceListView.qml
|
||||
view/Control/Display/Participant/ParticipantListView.qml
|
||||
|
|
|
|||
|
|
@ -171,6 +171,7 @@ Button {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
background: Item {
|
||||
anchors.fill: parent
|
||||
Rectangle {
|
||||
|
|
@ -187,6 +188,9 @@ Button {
|
|||
shadowColor: DefaultStyle.grey_1000
|
||||
shadowOpacity: 0.4
|
||||
}
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,6 +197,7 @@ ListView {
|
|||
Text {
|
||||
Layout.fillWidth: true
|
||||
maximumLineCount: 1
|
||||
visible: !remoteComposingInfo.visible
|
||||
text: modelData.core.lastMessageText
|
||||
color: DefaultStyle.main2_400
|
||||
font {
|
||||
|
|
@ -204,7 +205,22 @@ ListView {
|
|||
weight: unreadCount.unread > 0 ? Typography.p2.weight : Typography.p1.weight
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
id: remoteComposingInfo
|
||||
visible: mainItem.currentIndex !== model.index && (modelData.core.composingName !== "" || modelData.core.sendingText !== "")
|
||||
Layout.fillWidth: true
|
||||
maximumLineCount: 1
|
||||
font {
|
||||
pixelSize: Typography.p3.pixelSize
|
||||
weight: Typography.p3.weight
|
||||
}
|
||||
//: %1 is writing…
|
||||
text: modelData.core.composingName !== ""
|
||||
? qsTr("chat_message_is_writing_info").arg(modelData.core.composingName)
|
||||
: modelData.core.sendingText !== ""
|
||||
? qsTr("chat_message_draft_sending_text").arg(modelData.core.sendingText)
|
||||
: ""
|
||||
}
|
||||
}
|
||||
ColumnLayout {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
|
|
|
|||
|
|
@ -170,7 +170,8 @@ ColumnLayout {
|
|||
property int columnCount: Math.round(list.width / 50 * DefaultStyle.dp)
|
||||
property int sc: grid.category === 'People & Body' ? mainItem.skinColor : -1
|
||||
columns: columnCount
|
||||
columnSpacing: Math.round(8 * DefaultStyle.dp)
|
||||
width: list.width
|
||||
columnSpacing: Math.round(5 * DefaultStyle.dp)
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Math.round(20 * DefaultStyle.dp)
|
||||
|
|
@ -77,7 +77,9 @@ Control.Control{
|
|||
smooth: false
|
||||
Layout.preferredWidth: 11 * DefaultStyle.dp
|
||||
Layout.preferredHeight: 11 * DefaultStyle.dp
|
||||
source: presenceBar.isRegistered ? mainItem.account.core.presenceIcon : mainItem.account?.core.registrationStateIcon
|
||||
source: presenceBar.isRegistered
|
||||
? mainItem.account.core.presenceIcon
|
||||
: mainItem.account?.core.registrationStateIcon || ""
|
||||
Layout.leftMargin: 8 * DefaultStyle.dp
|
||||
}
|
||||
Text {
|
||||
|
|
@ -110,7 +112,6 @@ Control.Control{
|
|||
popup.contentItem: Rectangle {
|
||||
implicitWidth: 280 * DefaultStyle.dp
|
||||
implicitHeight: 20 * DefaultStyle.dp + (setCustomStatus.visible ? 240 * DefaultStyle.dp : setPresence.implicitHeight)
|
||||
MouseArea{anchors.fill: parent}
|
||||
Presence {
|
||||
id: setPresence
|
||||
anchors.fill: parent
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import Linphone
|
|||
import SettingsCpp
|
||||
import 'qrc:/qt/qml/Linphone/view/Style/buttonStyle.js' as ButtonStyle
|
||||
|
||||
ColumnLayout {
|
||||
Column {
|
||||
id: mainItem
|
||||
spacing: 20 * DefaultStyle.dp
|
||||
anchors.centerIn: parent
|
||||
|
|
|
|||
|
|
@ -1,247 +0,0 @@
|
|||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls.Basic as Control
|
||||
import Linphone
|
||||
import UtilsCpp
|
||||
import SettingsCpp
|
||||
import "qrc:/qt/qml/Linphone/view/Style/buttonStyle.js" as ButtonStyle
|
||||
import "qrc:/qt/qml/Linphone/view/Control/Tool/Helper/utils.js" as Utils
|
||||
|
||||
ListView {
|
||||
id: mainItem
|
||||
clip: true
|
||||
|
||||
property SearchBar searchBar
|
||||
property bool loading: false
|
||||
property string searchText: searchBar?.text
|
||||
property real busyIndicatorSize: Math.round(60 * DefaultStyle.dp)
|
||||
|
||||
signal resultsReceived
|
||||
|
||||
onResultsReceived: {
|
||||
loading = false
|
||||
// contentY = 0
|
||||
}
|
||||
|
||||
model: CallHistoryProxy {
|
||||
id: callHistoryProxy
|
||||
Component.onCompleted: {
|
||||
loading = true
|
||||
}
|
||||
filterText: mainItem.searchText
|
||||
onFilterTextChanged: maxDisplayItems = initialDisplayItems
|
||||
initialDisplayItems: Math.max(
|
||||
20,
|
||||
2 * mainItem.height / (Math.round(56 * DefaultStyle.dp)))
|
||||
displayItemsStep: 3 * initialDisplayItems / 2
|
||||
onModelReset: {
|
||||
mainItem.resultsReceived()
|
||||
}
|
||||
}
|
||||
flickDeceleration: 10000
|
||||
spacing: Math.round(10 * DefaultStyle.dp)
|
||||
|
||||
Keys.onPressed: event => {
|
||||
if (event.key == Qt.Key_Escape) {
|
||||
console.log("Back")
|
||||
searchBar.forceActiveFocus()
|
||||
event.accepted = true
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: cacheBuffer = Math.max(
|
||||
contentHeight,
|
||||
0) //contentHeight>0 ? contentHeight : 0// cache all items
|
||||
// remove binding loop
|
||||
onContentHeightChanged: Qt.callLater(function () {
|
||||
if (mainItem)
|
||||
mainItem.cacheBuffer = Math?.max(contentHeight, 0) || 0
|
||||
})
|
||||
|
||||
onActiveFocusChanged: if (activeFocus && currentIndex < 0 && count > 0)
|
||||
currentIndex = 0
|
||||
onCountChanged: {
|
||||
if (currentIndex < 0 && count > 0) {
|
||||
mainItem.currentIndex = 0 // Select first item after loading model
|
||||
}
|
||||
if (atYBeginning)
|
||||
positionViewAtBeginning() // Stay at beginning
|
||||
}
|
||||
Connections {
|
||||
target: deleteHistoryPopup
|
||||
function onAccepted() {
|
||||
mainItem.model.removeAllEntries()
|
||||
}
|
||||
}
|
||||
|
||||
onAtYEndChanged: {
|
||||
if (atYEnd && count > 0) {
|
||||
callHistoryProxy.displayMore()
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------
|
||||
function moveToCurrentItem() {
|
||||
if (mainItem.currentIndex >= 0)
|
||||
Utils.updatePosition(mainItem, mainItem)
|
||||
}
|
||||
onCurrentItemChanged: {
|
||||
moveToCurrentItem()
|
||||
}
|
||||
// Update position only if we are moving to current item and its position is changing.
|
||||
property var _currentItemY: currentItem?.y
|
||||
on_CurrentItemYChanged: if (_currentItemY && moveAnimation.running) {
|
||||
moveToCurrentItem()
|
||||
}
|
||||
Behavior on contentY {
|
||||
NumberAnimation {
|
||||
id: moveAnimation
|
||||
duration: 500
|
||||
easing.type: Easing.OutExpo
|
||||
alwaysRunToEnd: true
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------
|
||||
onVisibleChanged: {
|
||||
// if (!visible)
|
||||
// currentIndex = -1
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
anchors.horizontalCenter: mainItem.horizontalCenter
|
||||
visible: mainItem.loading
|
||||
height: visible ? mainItem.busyIndicatorSize : 0
|
||||
width: mainItem.busyIndicatorSize
|
||||
indicatorHeight: mainItem.busyIndicatorSize
|
||||
indicatorWidth: mainItem.busyIndicatorSize
|
||||
indicatorColor: DefaultStyle.main1_500_main
|
||||
}
|
||||
|
||||
// Qt bug: sometimes, containsMouse may not be send and update on each MouseArea.
|
||||
// So we need to use this variable to switch off all hovered items.
|
||||
property int lastMouseContainsIndex: -1
|
||||
delegate: FocusScope {
|
||||
width: mainItem.width
|
||||
height: Math.round(56 * DefaultStyle.dp)
|
||||
RowLayout {
|
||||
z: 1
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Math.round(10 * DefaultStyle.dp)
|
||||
spacing: Math.round(10 * DefaultStyle.dp)
|
||||
Avatar {
|
||||
id: historyAvatar
|
||||
property var contactObj: UtilsCpp.findFriendByAddress(
|
||||
modelData.core.remoteAddress)
|
||||
contact: contactObj?.value || null
|
||||
displayNameVal: modelData.core.displayName
|
||||
secured: securityLevel === LinphoneEnums.SecurityLevel.EndToEndEncryptedAndVerified
|
||||
width: Math.round(45 * DefaultStyle.dp)
|
||||
height: Math.round(45 * DefaultStyle.dp)
|
||||
isConference: modelData.core.isConference
|
||||
shadowEnabled: false
|
||||
asynchronous: false
|
||||
}
|
||||
ColumnLayout {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
spacing: Math.round(5 * DefaultStyle.dp)
|
||||
Text {
|
||||
id: friendAddress
|
||||
Layout.fillWidth: true
|
||||
maximumLineCount: 1
|
||||
text: historyAvatar.displayNameVal
|
||||
font {
|
||||
pixelSize: Typography.p1.pixelSize
|
||||
weight: Typography.p1.weight
|
||||
capitalization: Font.Capitalize
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
spacing: Math.round(6 * DefaultStyle.dp)
|
||||
EffectImage {
|
||||
id: statusIcon
|
||||
imageSource: modelData.core.status === LinphoneEnums.CallStatus.Declined
|
||||
|| modelData.core.status
|
||||
=== LinphoneEnums.CallStatus.DeclinedElsewhere
|
||||
|| modelData.core.status === LinphoneEnums.CallStatus.Aborted
|
||||
|| modelData.core.status === LinphoneEnums.CallStatus.EarlyAborted ? AppIcons.arrowElbow : modelData.core.isOutgoing ? AppIcons.arrowUpRight : AppIcons.arrowDownLeft
|
||||
colorizationColor: modelData.core.status
|
||||
=== LinphoneEnums.CallStatus.Declined
|
||||
|| modelData.core.status
|
||||
=== LinphoneEnums.CallStatus.DeclinedElsewhere
|
||||
|| modelData.core.status
|
||||
=== LinphoneEnums.CallStatus.Aborted
|
||||
|| modelData.core.status
|
||||
=== LinphoneEnums.CallStatus.EarlyAborted
|
||||
|| modelData.core.status === LinphoneEnums.CallStatus.Missed ? DefaultStyle.danger_500main : modelData.core.isOutgoing ? DefaultStyle.info_500_main : DefaultStyle.success_500main
|
||||
Layout.preferredWidth: Math.round(12 * DefaultStyle.dp)
|
||||
Layout.preferredHeight: Math.round(12 * DefaultStyle.dp)
|
||||
transform: Rotation {
|
||||
angle: modelData.core.isOutgoing
|
||||
&& (modelData.core.status === LinphoneEnums.CallStatus.Declined
|
||||
|| modelData.core.status
|
||||
=== LinphoneEnums.CallStatus.DeclinedElsewhere
|
||||
|| modelData.core.status === LinphoneEnums.CallStatus.Aborted
|
||||
|| modelData.core.status
|
||||
=== LinphoneEnums.CallStatus.EarlyAborted) ? 180 : 0
|
||||
origin {
|
||||
x: statusIcon.width / 2
|
||||
y: statusIcon.height / 2
|
||||
}
|
||||
}
|
||||
}
|
||||
Text {
|
||||
// text: modelData.core.date
|
||||
text: UtilsCpp.formatDate(modelData.core.date)
|
||||
font {
|
||||
pixelSize: Math.round(12 * DefaultStyle.dp)
|
||||
weight: Math.round(300 * DefaultStyle.dp)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
BigButton {
|
||||
style: ButtonStyle.noBackground
|
||||
icon.source: AppIcons.phone
|
||||
focus: true
|
||||
activeFocusOnTab: false
|
||||
asynchronous: false
|
||||
onClicked: {
|
||||
if (modelData.core.isConference) {
|
||||
var callsWindow = UtilsCpp.getCallsWindow()
|
||||
callsWindow.setupConference(
|
||||
modelData.core.conferenceInfo)
|
||||
UtilsCpp.smartShowWindow(callsWindow)
|
||||
} else {
|
||||
UtilsCpp.createCall(modelData.core.remoteAddress)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
focus: true
|
||||
onContainsMouseChanged: {
|
||||
if (containsMouse)
|
||||
mainItem.lastMouseContainsIndex = index
|
||||
else if (mainItem.lastMouseContainsIndex == index)
|
||||
mainItem.lastMouseContainsIndex = -1
|
||||
}
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
opacity: 0.7
|
||||
radius: Math.round(8 * DefaultStyle.dp)
|
||||
color: mainItem.currentIndex
|
||||
=== index ? DefaultStyle.main2_200 : DefaultStyle.main2_100
|
||||
visible: mainItem.lastMouseContainsIndex === index
|
||||
|| mainItem.currentIndex === index
|
||||
}
|
||||
onPressed: {
|
||||
mainItem.currentIndex = model.index
|
||||
mainItem.forceActiveFocus()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -101,6 +101,7 @@ RowLayout {
|
|||
visible: emojiPickerButton.checked
|
||||
closePolicy: Popup.CloseOnPressOutside
|
||||
onClosed: emojiPickerButton.checked = false
|
||||
padding: 10 * DefaultStyle.dp
|
||||
background: Item {
|
||||
anchors.fill: parent
|
||||
Rectangle {
|
||||
|
|
@ -234,13 +235,14 @@ RowLayout {
|
|||
}
|
||||
onCursorRectangleChanged: sendingAreaFlickable.ensureVisible(cursorRectangle)
|
||||
wrapMode: TextEdit.WordWrap
|
||||
property string previousText
|
||||
Component.onCompleted: previousText = text
|
||||
Component.onCompleted: {
|
||||
if (mainItem.chat) text = mainItem.chat.core.sendingText
|
||||
}
|
||||
onTextChanged: {
|
||||
if (previousText === "" && text !== "") {
|
||||
if (text !== "" && mainItem.chat.core.composingName !== "") {
|
||||
mainItem.chat.core.lCompose()
|
||||
}
|
||||
previousText = text
|
||||
mainItem.chat.core.sendingText = text
|
||||
}
|
||||
Keys.onPressed: (event) => {
|
||||
event.accepted = false
|
||||
|
|
|
|||
Loading…
Reference in a new issue