mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-27 08:49:19 +00:00
fix chat list slowness
This commit is contained in:
parent
8452ecbdfd
commit
285e6645f8
28 changed files with 446 additions and 326 deletions
|
|
@ -51,7 +51,7 @@ ChatCore::ChatCore(const std::shared_ptr<linphone::ChatRoom> &chatRoom) : QObjec
|
|||
if (chatRoom->hasCapability((int)linphone::ChatRoom::Capabilities::Basic)) {
|
||||
mTitle = ToolModel::getDisplayName(chatRoomAddress);
|
||||
mAvatarUri = ToolModel::getDisplayName(chatRoomAddress);
|
||||
mPeerAddress = Utils::coreStringToAppString(chatRoomAddress->asStringUriOnly());
|
||||
mParticipantAddress = Utils::coreStringToAppString(chatRoomAddress->asStringUriOnly());
|
||||
mIsGroupChat = false;
|
||||
mIsBasic = true;
|
||||
mConferenceJoined = true;
|
||||
|
|
@ -65,7 +65,7 @@ ChatCore::ChatCore(const std::shared_ptr<linphone::ChatRoom> &chatRoom) : QObjec
|
|||
mAvatarUri = ToolModel::getDisplayName(peer->getAddress()->clone());
|
||||
if (participants.size() == 1) {
|
||||
auto peerAddress = peer->getAddress();
|
||||
if (peerAddress) mPeerAddress = Utils::coreStringToAppString(peerAddress->asStringUriOnly());
|
||||
if (peerAddress) mParticipantAddress = Utils::coreStringToAppString(peerAddress->asStringUriOnly());
|
||||
}
|
||||
}
|
||||
mIsGroupChat = false;
|
||||
|
|
@ -90,24 +90,24 @@ ChatCore::ChatCore(const std::shared_ptr<linphone::ChatRoom> &chatRoom) : QObjec
|
|||
static_cast<int>(linphone::ChatRoom::HistoryFilter::InfoNoDevice)
|
||||
: static_cast<int>(linphone::ChatRoom::HistoryFilter::ChatMessage);
|
||||
|
||||
auto history = chatRoom->getHistory(0, filter);
|
||||
std::list<std::shared_ptr<linphone::EventLog>> lHistory;
|
||||
for (auto &eventLog : history) {
|
||||
lHistory.push_back(eventLog);
|
||||
}
|
||||
QList<QSharedPointer<EventLogCore>> eventList;
|
||||
for (auto &event : lHistory) {
|
||||
auto eventLogCore = EventLogCore::create(event);
|
||||
eventList.append(eventLogCore);
|
||||
if (auto isMessage = eventLogCore->getChatMessageCore()) {
|
||||
for (auto content : isMessage->getChatMessageContentList()) {
|
||||
if (content->isFile() && !content->isVoiceRecording()) {
|
||||
mFileList.append(content);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
resetEventLogList(eventList);
|
||||
// auto history = chatRoom->getHistory(0, filter);
|
||||
// std::list<std::shared_ptr<linphone::EventLog>> lHistory;
|
||||
// for (auto &eventLog : history) {
|
||||
// lHistory.push_back(eventLog);
|
||||
// }
|
||||
// QList<QSharedPointer<EventLogCore>> eventList;
|
||||
// for (auto &event : lHistory) {
|
||||
// auto eventLogCore = EventLogCore::create(event);
|
||||
// eventList.append(eventLogCore);
|
||||
// if (auto isMessage = eventLogCore->getChatMessageCore()) {
|
||||
// for (auto content : isMessage->getChatMessageContentList()) {
|
||||
// if (content->isFile() && !content->isVoiceRecording()) {
|
||||
// mFileList.append(content);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// resetEventLogList(eventList);
|
||||
mIdentifier = Utils::coreStringToAppString(chatRoom->getIdentifier());
|
||||
mChatRoomState = LinphoneEnums::fromLinphone(chatRoom->getState());
|
||||
mIsEncrypted = chatRoom->hasCapability((int)linphone::ChatRoom::Capabilities::Encrypted);
|
||||
|
|
@ -122,15 +122,15 @@ ChatCore::ChatCore(const std::shared_ptr<linphone::ChatRoom> &chatRoom) : QObjec
|
|||
connect(this, &ChatCore::eventRemoved, this, &ChatCore::lUpdateLastMessage);
|
||||
auto resetFileListLambda = [this] {
|
||||
QList<QSharedPointer<ChatMessageContentCore>> fileList;
|
||||
for (auto &eventLogCore : mEventLogList) {
|
||||
if (auto isMessage = eventLogCore->getChatMessageCore()) {
|
||||
for (auto content : isMessage->getChatMessageContentList()) {
|
||||
if (content->isFile() && !content->isVoiceRecording()) {
|
||||
fileList.append(content);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// for (auto &eventLogCore : mEventLogList) {
|
||||
// if (auto isMessage = eventLogCore->getChatMessageCore()) {
|
||||
// for (auto content : isMessage->getChatMessageContentList()) {
|
||||
// if (content->isFile() && !content->isVoiceRecording()) {
|
||||
// fileList.append(content);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
resetFileList(fileList);
|
||||
};
|
||||
connect(this, &ChatCore::eventListChanged, this, resetFileListLambda);
|
||||
|
|
@ -172,7 +172,7 @@ void ChatCore::setSelf(QSharedPointer<ChatCore> me) {
|
|||
&ChatCore::lLeave, [this]() { mChatModelConnection->invokeToModel([this]() { mChatModel->leave(); }); });
|
||||
mChatModelConnection->makeConnectToModel(&ChatModel::historyDeleted, [this]() {
|
||||
mChatModelConnection->invokeToCore([this]() {
|
||||
clearEventLogList();
|
||||
emit eventListCleared();
|
||||
//: Deleted
|
||||
Utils::showInformationPopup(tr("info_toast_deleted_title"),
|
||||
//: Message history has been deleted
|
||||
|
|
@ -221,7 +221,8 @@ void ChatCore::setSelf(QSharedPointer<ChatCore> me) {
|
|||
avatarUri = ToolModel::getDisplayName(peer->getAddress()->clone());
|
||||
if (linParticipants.size() == 1) {
|
||||
auto peerAddress = peer->getAddress();
|
||||
if (peerAddress) mPeerAddress = Utils::coreStringToAppString(peerAddress->asStringUriOnly());
|
||||
if (peerAddress)
|
||||
mParticipantAddress = Utils::coreStringToAppString(peerAddress->asStringUriOnly());
|
||||
}
|
||||
}
|
||||
mChatModelConnection->invokeToCore([this, title, avatarUri]() {
|
||||
|
|
@ -242,7 +243,7 @@ void ChatCore::setSelf(QSharedPointer<ChatCore> me) {
|
|||
qDebug() << "EVENT LOG RECEIVED IN CHATROOM" << mChatModel->getTitle();
|
||||
auto event = EventLogCore::create(eventLog);
|
||||
if (event->isHandled()) {
|
||||
mChatModelConnection->invokeToCore([this, event]() { appendEventLogToEventLogList(event); });
|
||||
mChatModelConnection->invokeToCore([this, event]() { emit eventsInserted({event}); });
|
||||
}
|
||||
mChatModelConnection->invokeToCore([this, event]() { emit lUpdateLastUpdatedTime(); });
|
||||
});
|
||||
|
|
@ -259,7 +260,7 @@ void ChatCore::setSelf(QSharedPointer<ChatCore> me) {
|
|||
list.push_back(event);
|
||||
}
|
||||
mChatModelConnection->invokeToCore([this, list]() {
|
||||
appendEventLogsToEventLogList(list);
|
||||
emit eventsInserted(list);
|
||||
emit lUpdateUnreadCount();
|
||||
emit lUpdateLastUpdatedTime();
|
||||
});
|
||||
|
|
@ -309,7 +310,7 @@ void ChatCore::setSelf(QSharedPointer<ChatCore> me) {
|
|||
&ChatModel::chatMessageSending, [this](const std::shared_ptr<linphone::ChatRoom> &chatRoom,
|
||||
const std::shared_ptr<const linphone::EventLog> &eventLog) {
|
||||
auto event = EventLogCore::create(eventLog);
|
||||
mChatModelConnection->invokeToCore([this, event]() { appendEventLogToEventLogList(event); });
|
||||
mChatModelConnection->invokeToCore([this, event]() { emit eventsInserted({event}); });
|
||||
});
|
||||
mChatModelConnection->makeConnectToCore(
|
||||
&ChatCore::lCompose, [this]() { mChatModelConnection->invokeToModel([this]() { mChatModel->compose(); }); });
|
||||
|
|
@ -405,7 +406,7 @@ void ChatCore::setSelf(QSharedPointer<ChatCore> me) {
|
|||
});
|
||||
|
||||
mCoreModelConnection = SafeConnection<ChatCore, CoreModel>::create(me, CoreModel::getInstance());
|
||||
if (!ToolModel::findFriendByAddress(mPeerAddress))
|
||||
if (!ToolModel::findFriendByAddress(mParticipantAddress))
|
||||
mCoreModelConnection->makeConnectToModel(&CoreModel::friendCreated,
|
||||
[this](std::shared_ptr<linphone::Friend> f) { updateInfo(f); });
|
||||
mCoreModelConnection->makeConnectToModel(&CoreModel::friendUpdated,
|
||||
|
|
@ -459,8 +460,8 @@ QString ChatCore::getIdentifier() const {
|
|||
return mIdentifier;
|
||||
}
|
||||
|
||||
QString ChatCore::getPeerAddress() const {
|
||||
return mPeerAddress;
|
||||
QString ChatCore::getParticipantAddress() const {
|
||||
return mParticipantAddress;
|
||||
}
|
||||
|
||||
QString ChatCore::getChatRoomAddress() const {
|
||||
|
|
@ -532,72 +533,6 @@ void ChatCore::setUnreadMessagesCount(int count) {
|
|||
}
|
||||
}
|
||||
|
||||
QList<QSharedPointer<EventLogCore>> ChatCore::getEventLogList() const {
|
||||
return mEventLogList;
|
||||
}
|
||||
|
||||
void ChatCore::resetEventLogList(QList<QSharedPointer<EventLogCore>> list) {
|
||||
for (auto &e : mEventLogList) {
|
||||
disconnect(e.get());
|
||||
}
|
||||
for (auto &e : list) {
|
||||
if (auto message = e->getChatMessageCore()) {
|
||||
connect(message.get(), &ChatMessageCore::isReadChanged, this, [this] { emit lUpdateUnreadCount(); });
|
||||
}
|
||||
}
|
||||
mEventLogList = list;
|
||||
emit eventListChanged();
|
||||
}
|
||||
|
||||
void ChatCore::appendEventLogsToEventLogList(QList<QSharedPointer<EventLogCore>> list) {
|
||||
int nbAdded = 0;
|
||||
for (auto &e : list) {
|
||||
auto it = std::find_if(mEventLogList.begin(), mEventLogList.end(), [e](QSharedPointer<EventLogCore> event) {
|
||||
return e->getEventLogId() == event->getEventLogId();
|
||||
});
|
||||
if (it == mEventLogList.end()) {
|
||||
if (auto message = e->getChatMessageCore())
|
||||
connect(message.get(), &ChatMessageCore::isReadChanged, this, [this] { emit lUpdateUnreadCount(); });
|
||||
mEventLogList.append(e);
|
||||
++nbAdded;
|
||||
}
|
||||
}
|
||||
if (nbAdded > 0) emit eventsInserted(list);
|
||||
}
|
||||
|
||||
void ChatCore::appendEventLogToEventLogList(QSharedPointer<EventLogCore> e) {
|
||||
if (mEventLogList.contains(e)) return;
|
||||
auto it = std::find_if(mEventLogList.begin(), mEventLogList.end(), [e](QSharedPointer<EventLogCore> event) {
|
||||
return e->getEventLogId() == event->getEventLogId();
|
||||
});
|
||||
if (it == mEventLogList.end()) {
|
||||
if (auto message = e->getChatMessageCore())
|
||||
connect(message.get(), &ChatMessageCore::isReadChanged, this, [this] { emit lUpdateUnreadCount(); });
|
||||
mEventLogList.append(e);
|
||||
emit eventsInserted({e});
|
||||
}
|
||||
}
|
||||
|
||||
void ChatCore::removeEventLogsFromEventLogList(QList<QSharedPointer<EventLogCore>> list) {
|
||||
int nbRemoved = 0;
|
||||
for (auto &e : list) {
|
||||
if (mEventLogList.contains(e)) {
|
||||
if (auto message = e->getChatMessageCore()) disconnect(message.get());
|
||||
mEventLogList.removeAll(e);
|
||||
++nbRemoved;
|
||||
}
|
||||
}
|
||||
if (nbRemoved > 0) emit eventRemoved();
|
||||
}
|
||||
|
||||
void ChatCore::clearEventLogList() {
|
||||
for (auto &e : mEventLogList) {
|
||||
disconnect(e.get());
|
||||
}
|
||||
mEventLogList.clear();
|
||||
emit eventListChanged();
|
||||
}
|
||||
|
||||
QString ChatCore::getComposingName() const {
|
||||
return mComposingName;
|
||||
}
|
||||
|
|
@ -723,7 +658,7 @@ QSharedPointer<AccountCore> ChatCore::getLocalAccount() const {
|
|||
|
||||
void ChatCore::updateInfo(const std::shared_ptr<linphone::Friend> &updatedFriend, bool isRemoval) {
|
||||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||
auto fAddress = ToolModel::interpretUrl(mPeerAddress);
|
||||
auto fAddress = ToolModel::interpretUrl(mParticipantAddress);
|
||||
bool isThisFriend = mFriendModel && updatedFriend == mFriendModel->getFriend();
|
||||
if (!isThisFriend)
|
||||
for (auto f : updatedFriend->getAddresses()) {
|
||||
|
|
@ -753,7 +688,8 @@ void ChatCore::updateInfo(const std::shared_ptr<linphone::Friend> &updatedFriend
|
|||
mAvatarUri = ToolModel::getDisplayName(peer->getAddress()->clone());
|
||||
if (participants.size() == 1) {
|
||||
auto peerAddress = peer->getAddress();
|
||||
if (peerAddress) mPeerAddress = Utils::coreStringToAppString(peerAddress->asStringUriOnly());
|
||||
if (peerAddress)
|
||||
mParticipantAddress = Utils::coreStringToAppString(peerAddress->asStringUriOnly());
|
||||
}
|
||||
}
|
||||
} else if (mChatModel->hasCapability((int)linphone::ChatRoom::Capabilities::Conference)) {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class ChatCore : public QObject, public AbstractObject {
|
|||
public:
|
||||
Q_PROPERTY(QString title READ getTitle WRITE setTitle NOTIFY titleChanged)
|
||||
Q_PROPERTY(QString identifier READ getIdentifier CONSTANT)
|
||||
Q_PROPERTY(QString peerAddress READ getPeerAddress CONSTANT)
|
||||
Q_PROPERTY(QString peerAddress READ getParticipantAddress CONSTANT)
|
||||
Q_PROPERTY(QString chatRoomAddress READ getChatRoomAddress CONSTANT)
|
||||
Q_PROPERTY(QString avatarUri READ getAvatarUri WRITE setAvatarUri NOTIFY avatarUriChanged)
|
||||
Q_PROPERTY(QDateTime lastUpdatedTime READ getLastUpdatedTime WRITE setLastUpdatedTime NOTIFY lastUpdatedTimeChanged)
|
||||
|
|
@ -118,7 +118,7 @@ public:
|
|||
void setUnreadMessagesCount(int count);
|
||||
|
||||
QString getChatRoomAddress() const;
|
||||
QString getPeerAddress() const;
|
||||
QString getParticipantAddress() const;
|
||||
|
||||
bool getMeAdmin() const;
|
||||
void setMeAdmin(bool admin);
|
||||
|
|
@ -127,12 +127,11 @@ public:
|
|||
void setIsSecured(bool secured);
|
||||
bool computeSecuredStatus() const;
|
||||
|
||||
QList<QSharedPointer<EventLogCore>> getEventLogList() const;
|
||||
void resetEventLogList(QList<QSharedPointer<EventLogCore>> list);
|
||||
void appendEventLogToEventLogList(QSharedPointer<EventLogCore> event);
|
||||
void appendEventLogsToEventLogList(QList<QSharedPointer<EventLogCore>> list);
|
||||
void removeEventLogsFromEventLogList(QList<QSharedPointer<EventLogCore>> list);
|
||||
void clearEventLogList();
|
||||
// void resetEventLogList(QList<QSharedPointer<EventLogCore>> list);
|
||||
// void appendEventLogToEventLogList(QSharedPointer<EventLogCore> event);
|
||||
// void appendEventLogsToEventLogList(QList<QSharedPointer<EventLogCore>> list);
|
||||
// void removeEventLogsFromEventLogList(QList<QSharedPointer<EventLogCore>> list);
|
||||
// void clearEventLogList();
|
||||
|
||||
QString getAvatarUri() const;
|
||||
void setAvatarUri(QString avatarUri);
|
||||
|
|
@ -163,6 +162,7 @@ signals:
|
|||
void titleChanged(QString title);
|
||||
void unreadMessagesCountChanged(int count);
|
||||
void eventListChanged();
|
||||
void eventListCleared();
|
||||
void eventsInserted(QList<QSharedPointer<EventLogCore>> list);
|
||||
void eventRemoved();
|
||||
void avatarUriChanged();
|
||||
|
|
@ -203,7 +203,7 @@ signals:
|
|||
private:
|
||||
QString id;
|
||||
QDateTime mLastUpdatedTime;
|
||||
QString mPeerAddress;
|
||||
QString mParticipantAddress;
|
||||
QString mChatRoomAddress;
|
||||
QString mTitle;
|
||||
QString mIdentifier;
|
||||
|
|
@ -229,7 +229,6 @@ private:
|
|||
LinphoneEnums::ChatRoomState mChatRoomState;
|
||||
std::shared_ptr<ChatModel> mChatModel;
|
||||
QSharedPointer<ChatMessageCore> mLastMessage;
|
||||
QList<QSharedPointer<EventLogCore>> mEventLogList;
|
||||
QSharedPointer<AccountCore> mLocalAccount;
|
||||
std::shared_ptr<FriendModel> mFriendModel;
|
||||
QSharedPointer<SafeConnection<ChatCore, ChatModel>> mChatModelConnection;
|
||||
|
|
|
|||
|
|
@ -81,8 +81,8 @@ void ChatList::connectItem(QSharedPointer<ChatCore> chat) {
|
|||
void ChatList::setSelf(QSharedPointer<ChatList> me) {
|
||||
mModelConnection = SafeConnection<ChatList, CoreModel>::create(me, CoreModel::getInstance());
|
||||
mModelConnection->makeConnectToCore(&ChatList::lUpdate, [this]() {
|
||||
clearData();
|
||||
beginResetModel();
|
||||
mList.clear();
|
||||
mModelConnection->invokeToModel([this]() {
|
||||
mustBeInLinphoneThread(getClassName());
|
||||
// Avoid copy to lambdas
|
||||
|
|
@ -95,6 +95,7 @@ void ChatList::setSelf(QSharedPointer<ChatList> me) {
|
|||
chats->push_back(model);
|
||||
}
|
||||
mModelConnection->invokeToCore([this, chats]() {
|
||||
mustBeInMainThread(getClassName());
|
||||
for (auto &chat : getSharedList<ChatCore>()) {
|
||||
if (chat) {
|
||||
disconnect(chat.get(), &ChatCore::deleted, this, nullptr);
|
||||
|
|
@ -106,7 +107,6 @@ void ChatList::setSelf(QSharedPointer<ChatList> me) {
|
|||
for (auto &chat : *chats) {
|
||||
connectItem(chat);
|
||||
}
|
||||
mustBeInMainThread(getClassName());
|
||||
add(*chats);
|
||||
endResetModel();
|
||||
delete chats;
|
||||
|
|
@ -117,27 +117,16 @@ void ChatList::setSelf(QSharedPointer<ChatList> me) {
|
|||
mModelConnection->makeConnectToModel(
|
||||
&CoreModel::defaultAccountChanged,
|
||||
[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) {
|
||||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||
if (!message) return;
|
||||
auto receiverAddress = message->getToAddress();
|
||||
if (!receiverAddress) {
|
||||
qWarning() << log().arg("Receiver account has no address, return");
|
||||
if (room->getAccount() != core->getDefaultAccount()) {
|
||||
qWarning() << log().arg("Chat room does not refer to current account, return");
|
||||
return;
|
||||
}
|
||||
auto defaultAddress = core->getDefaultAccount()->getContactAddress();
|
||||
if (defaultAddress && !defaultAddress->weakEqual(receiverAddress)) {
|
||||
qDebug() << log().arg("Receiver account is not the default one, do not add chat to list");
|
||||
return;
|
||||
}
|
||||
auto senderAddress = message->getFromAddress();
|
||||
if (defaultAddress && defaultAddress->weakEqual(senderAddress)) {
|
||||
qDebug() << log().arg("Sender account is the default one, do not add chat to list");
|
||||
return;
|
||||
}
|
||||
|
||||
auto chatCore = ChatCore::create(room);
|
||||
mModelConnection->invokeToCore([this, chatCore] {
|
||||
auto chatList = getSharedList<ChatCore>();
|
||||
|
|
@ -191,8 +180,7 @@ int ChatList::findChatIndex(ChatGui *chatGui) {
|
|||
return it == chatList.end() ? -1 : std::distance(chatList.begin(), it);
|
||||
}
|
||||
|
||||
void ChatList::addChatInList(ChatGui *chatGui) {
|
||||
auto chatCore = chatGui->mCore;
|
||||
void ChatList::addChatInList(QSharedPointer<ChatCore> chatCore) {
|
||||
auto chatList = getSharedList<ChatCore>();
|
||||
auto it = std::find_if(chatList.begin(), chatList.end(), [chatCore](const QSharedPointer<ChatCore> item) {
|
||||
return item && chatCore && item->getModel() && chatCore->getModel() &&
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public:
|
|||
void connectItem(QSharedPointer<ChatCore> chat);
|
||||
|
||||
int findChatIndex(ChatGui *chat);
|
||||
void addChatInList(ChatGui *chatGui);
|
||||
void addChatInList(QSharedPointer<ChatCore> chatCore);
|
||||
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
signals:
|
||||
|
|
|
|||
|
|
@ -69,8 +69,8 @@ int ChatProxy::findChatIndex(ChatGui *chatGui) {
|
|||
|
||||
void ChatProxy::addChatInList(ChatGui *chatGui) {
|
||||
auto chatList = getListModel<ChatList>();
|
||||
if (chatList) {
|
||||
chatList->addChatInList(chatGui);
|
||||
if (chatList && chatGui) {
|
||||
chatList->addChatInList(chatGui->mCore);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ DEFINE_ABSTRACT_OBJECT(ChatMessageFileList)
|
|||
|
||||
QSharedPointer<ChatMessageFileList> ChatMessageFileList::create() {
|
||||
auto model = QSharedPointer<ChatMessageFileList>(new ChatMessageFileList(), &QObject::deleteLater);
|
||||
model->setSelf(model);
|
||||
model->moveToThread(App::getInstance()->thread());
|
||||
return model;
|
||||
}
|
||||
|
|
@ -46,24 +47,77 @@ ChatMessageFileList::~ChatMessageFileList() {
|
|||
mList.clear();
|
||||
}
|
||||
|
||||
void ChatMessageFileList::setSelf(QSharedPointer<ChatMessageFileList> me) {
|
||||
mCoreModelConnection = SafeConnection<ChatMessageFileList, CoreModel>::create(me, CoreModel::getInstance());
|
||||
mCoreModelConnection->makeConnectToCore(&ChatMessageFileList::lUpdate, [this]() {
|
||||
mustBeInMainThread(log().arg(Q_FUNC_INFO));
|
||||
beginResetModel();
|
||||
mList.clear();
|
||||
if (!mChat) {
|
||||
endResetModel();
|
||||
return;
|
||||
}
|
||||
auto chatModel = mChat->getModel();
|
||||
if (!chatModel) {
|
||||
endResetModel();
|
||||
return;
|
||||
}
|
||||
mCoreModelConnection->invokeToModel([this, chatModel]() {
|
||||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||
std::list<std::shared_ptr<linphone::Content>> medias;
|
||||
std::list<std::shared_ptr<linphone::Content>> docs;
|
||||
QList<QSharedPointer<ChatMessageContentCore>> *contents =
|
||||
new QList<QSharedPointer<ChatMessageContentCore>>();
|
||||
if (mFilterType == (int)FilterContentType::Medias) {
|
||||
medias = chatModel->getSharedMedias();
|
||||
} else if (mFilterType == (int)FilterContentType::Documents) {
|
||||
docs = chatModel->getSharedDocuments();
|
||||
} else {
|
||||
medias = chatModel->getSharedMedias();
|
||||
docs = chatModel->getSharedDocuments();
|
||||
}
|
||||
for (auto it : medias) {
|
||||
auto model = ChatMessageContentCore::create(it, nullptr);
|
||||
contents->push_back(model);
|
||||
}
|
||||
for (auto it : docs) {
|
||||
auto model = ChatMessageContentCore::create(it, nullptr);
|
||||
contents->push_back(model);
|
||||
}
|
||||
mCoreModelConnection->invokeToCore([this, contents] {
|
||||
for (auto i : *contents)
|
||||
mList << i.template objectCast<QObject>();
|
||||
endResetModel();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
QSharedPointer<ChatCore> ChatMessageFileList::getChatCore() const {
|
||||
return mChat;
|
||||
}
|
||||
|
||||
void ChatMessageFileList::setChatCore(QSharedPointer<ChatCore> chatCore) {
|
||||
if (mChat != chatCore) {
|
||||
if (mChat) disconnect(mChat.get());
|
||||
// if (mChat) disconnect(mChat.get());
|
||||
mChat = chatCore;
|
||||
auto lUpdate = [this] {
|
||||
auto fileList = mChat->getFileList();
|
||||
resetData<ChatMessageContentCore>(fileList);
|
||||
};
|
||||
if (mChat) connect(mChat.get(), &ChatCore::fileListChanged, this, lUpdate);
|
||||
// if (mChat) connect(mChat.get(), &ChatCore::fileListChanged, this, lUpdate);
|
||||
lUpdate();
|
||||
emit chatChanged();
|
||||
}
|
||||
}
|
||||
|
||||
int ChatMessageFileList::getFilterType() const {
|
||||
return mFilterType;
|
||||
}
|
||||
|
||||
void ChatMessageFileList::setFilterType(int filterType) {
|
||||
if (mFilterType != filterType) {
|
||||
mFilterType = filterType;
|
||||
lUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
QVariant ChatMessageFileList::data(const QModelIndex &index, int role) const {
|
||||
int row = index.row();
|
||||
if (!index.isValid() || row < 0 || row >= mList.count()) return QVariant();
|
||||
|
|
|
|||
|
|
@ -32,20 +32,29 @@
|
|||
class ChatMessageFileList : public ListProxy, public AbstractObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum class FilterContentType { All = 0, Medias = 1, Documents = 2 };
|
||||
static QSharedPointer<ChatMessageFileList> create();
|
||||
ChatMessageFileList(QObject *parent = Q_NULLPTR);
|
||||
~ChatMessageFileList();
|
||||
|
||||
void setSelf(QSharedPointer<ChatMessageFileList> me);
|
||||
|
||||
QSharedPointer<ChatCore> getChatCore() const;
|
||||
void setChatCore(QSharedPointer<ChatCore> chatCore);
|
||||
int getFilterType() const;
|
||||
void setFilterType(int filterType);
|
||||
|
||||
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
signals:
|
||||
void chatChanged();
|
||||
void lUpdate();
|
||||
void filterTypeChanged();
|
||||
|
||||
private:
|
||||
int mFilterType;
|
||||
QSharedPointer<ChatCore> mChat;
|
||||
QSharedPointer<SafeConnection<ChatMessageFileList, CoreModel>> mCoreModelConnection;
|
||||
DECLARE_ABSTRACT_OBJECT
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -59,9 +59,21 @@ QSharedPointer<ChatCore> EventLogList::getChatCore() const {
|
|||
return mChatCore;
|
||||
}
|
||||
|
||||
void EventLogList::disconnectItem(const QSharedPointer<EventLogCore> &item) {
|
||||
auto message = item->getChatMessageCore();
|
||||
if (message) {
|
||||
disconnect(message.get(), &ChatMessageCore::isReadChanged, this, nullptr);
|
||||
disconnect(message.get(), &ChatMessageCore::deleted, this, nullptr);
|
||||
disconnect(message.get(), &ChatMessageCore::ephemeralDurationChanged, this, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
void EventLogList::connectItem(const QSharedPointer<EventLogCore> &item) {
|
||||
auto message = item->getChatMessageCore();
|
||||
if (message) {
|
||||
connect(message.get(), &ChatMessageCore::isReadChanged, this, [this] {
|
||||
if (mChatCore) emit mChatCore->lUpdateUnreadCount();
|
||||
});
|
||||
connect(message.get(), &ChatMessageCore::deleted, this, [this, item] {
|
||||
if (mChatCore) emit mChatCore->lUpdateLastMessage();
|
||||
remove(item);
|
||||
|
|
@ -83,6 +95,7 @@ void EventLogList::setChatCore(QSharedPointer<ChatCore> core) {
|
|||
mChatCore = core;
|
||||
if (mChatCore) {
|
||||
connect(mChatCore.get(), &ChatCore::eventListChanged, this, &EventLogList::lUpdate);
|
||||
connect(mChatCore.get(), &ChatCore::eventListCleared, this, [this] { resetData(); });
|
||||
connect(mChatCore.get(), &ChatCore::eventsInserted, this, [this](QList<QSharedPointer<EventLogCore>> list) {
|
||||
auto eventsList = getSharedList<EventLogCore>();
|
||||
for (auto &event : list) {
|
||||
|
|
@ -98,8 +111,8 @@ void EventLogList::setChatCore(QSharedPointer<ChatCore> core) {
|
|||
}
|
||||
});
|
||||
}
|
||||
emit eventChanged();
|
||||
lUpdate();
|
||||
emit chatGuiChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -150,22 +163,45 @@ void EventLogList::findChatMessageWithFilter(QString filter,
|
|||
}
|
||||
|
||||
void EventLogList::setSelf(QSharedPointer<EventLogList> me) {
|
||||
connect(this, &EventLogList::lUpdate, this, [this]() {
|
||||
resetData();
|
||||
emit listAboutToBeReset();
|
||||
for (auto &event : getSharedList<EventLogCore>()) {
|
||||
auto message = event->getChatMessageCore();
|
||||
if (message) {
|
||||
disconnect(message.get(), &ChatMessageCore::ephemeralDurationChanged, this, nullptr);
|
||||
disconnect(message.get(), &ChatMessageCore::deleted, this, nullptr);
|
||||
mCoreModelConnection = SafeConnection<EventLogList, CoreModel>::create(me, CoreModel::getInstance());
|
||||
|
||||
mCoreModelConnection->makeConnectToCore(&EventLogList::lUpdate, [this]() {
|
||||
mustBeInMainThread(log().arg(Q_FUNC_INFO));
|
||||
beginResetModel();
|
||||
mList.clear();
|
||||
if (!mChatCore) {
|
||||
endResetModel();
|
||||
return;
|
||||
}
|
||||
auto chatModel = mChatCore->getModel();
|
||||
if (!chatModel) {
|
||||
endResetModel();
|
||||
return;
|
||||
}
|
||||
mCoreModelConnection->invokeToModel([this, chatModel]() {
|
||||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||
auto linphoneLogs = chatModel->getHistory();
|
||||
QList<QSharedPointer<EventLogCore>> *events = new QList<QSharedPointer<EventLogCore>>();
|
||||
for (auto it : linphoneLogs) {
|
||||
auto model = EventLogCore::create(it);
|
||||
events->push_back(model);
|
||||
}
|
||||
}
|
||||
if (!mChatCore) return;
|
||||
auto events = mChatCore->getEventLogList();
|
||||
for (auto &event : events) {
|
||||
connectItem(event);
|
||||
}
|
||||
resetData<EventLogCore>(events);
|
||||
mCoreModelConnection->invokeToCore([this, events] {
|
||||
for (auto &event : getSharedList<EventLogCore>()) {
|
||||
auto message = event->getChatMessageCore();
|
||||
if (message) {
|
||||
disconnect(message.get(), &ChatMessageCore::ephemeralDurationChanged, this, nullptr);
|
||||
disconnect(message.get(), &ChatMessageCore::deleted, this, nullptr);
|
||||
}
|
||||
}
|
||||
for (auto &event : *events) {
|
||||
connectItem(event);
|
||||
}
|
||||
for (auto i : *events)
|
||||
mList << i.template objectCast<QObject>();
|
||||
endResetModel();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
connect(this, &EventLogList::filterChanged, [this](QString filter) {
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ public:
|
|||
void setChatGui(ChatGui *chat);
|
||||
|
||||
void connectItem(const QSharedPointer<EventLogCore> &item);
|
||||
void disconnectItem(const QSharedPointer<EventLogCore> &item);
|
||||
|
||||
int findFirstUnreadIndex();
|
||||
|
||||
|
|
@ -61,15 +62,16 @@ public:
|
|||
signals:
|
||||
void lUpdate();
|
||||
void filterChanged(QString filter);
|
||||
void eventChanged();
|
||||
void eventInserted(int index, EventLogGui *message);
|
||||
void messageWithFilterFound(int index);
|
||||
void listAboutToBeReset();
|
||||
void chatGuiChanged();
|
||||
|
||||
private:
|
||||
QString mFilter;
|
||||
QSharedPointer<ChatCore> mChatCore;
|
||||
QSharedPointer<SafeConnection<ChatCore, ChatModel>> mModelConnection;
|
||||
QSharedPointer<SafeConnection<ChatCore, ChatModel>> mChatModelConnection;
|
||||
QSharedPointer<SafeConnection<EventLogList, CoreModel>> mCoreModelConnection;
|
||||
DECLARE_ABSTRACT_OBJECT
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ void EventLogProxy::setSourceModel(QAbstractItemModel *model) {
|
|||
}
|
||||
auto newEventLogList = dynamic_cast<EventLogList *>(model);
|
||||
if (newEventLogList) {
|
||||
connect(newEventLogList, &EventLogList::eventChanged, this, &EventLogProxy::eventChanged);
|
||||
connect(newEventLogList, &EventLogList::listAboutToBeReset, this, &EventLogProxy::listAboutToBeReset);
|
||||
connect(newEventLogList, &EventLogList::chatGuiChanged, this, &EventLogProxy::chatGuiChanged);
|
||||
connect(newEventLogList, &EventLogList::eventInserted, this,
|
||||
[this, newEventLogList](int index, EventLogGui *event) {
|
||||
invalidate();
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class ChatGui;
|
|||
|
||||
class EventLogProxy : public LimitProxy, public AbstractObject {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(ChatGui *chatGui READ getChatGui WRITE setChatGui NOTIFY eventChanged)
|
||||
Q_PROPERTY(ChatGui *chatGui READ getChatGui WRITE setChatGui NOTIFY chatGuiChanged)
|
||||
|
||||
public:
|
||||
DECLARE_SORTFILTER_CLASS()
|
||||
|
|
@ -52,10 +52,10 @@ public:
|
|||
Q_INVOKABLE void findIndexCorrespondingToFilter(int startIndex, bool forward = true, bool isFirstResearch = true);
|
||||
|
||||
signals:
|
||||
void eventChanged();
|
||||
void eventInserted(int index, EventLogGui *message);
|
||||
void indexWithFilterFound(int index);
|
||||
void listAboutToBeReset();
|
||||
void chatGuiChanged();
|
||||
|
||||
protected:
|
||||
QSharedPointer<EventLogList> mList;
|
||||
|
|
|
|||
|
|
@ -60,16 +60,22 @@ void ConferenceInfoList::setSelf(QSharedPointer<ConferenceInfoList> me) {
|
|||
|
||||
mCoreModelConnection->makeConnectToCore(&ConferenceInfoList::lUpdate, [this]() {
|
||||
mCoreModelConnection->invokeToModel([this]() {
|
||||
QList<QSharedPointer<ConferenceInfoCore>> *items = new QList<QSharedPointer<ConferenceInfoCore>>();
|
||||
mustBeInLinphoneThread(getClassName());
|
||||
beginResetModel();
|
||||
mList.clear();
|
||||
QList<QSharedPointer<ConferenceInfoCore>> *items = new QList<QSharedPointer<ConferenceInfoCore>>();
|
||||
auto defaultAccount = CoreModel::getInstance()->getCore()->getDefaultAccount();
|
||||
setAccountConnected(defaultAccount && defaultAccount->getState() == linphone::RegistrationState::Ok);
|
||||
if (!defaultAccount || !mAccountConnected) {
|
||||
endResetModel();
|
||||
return;
|
||||
}
|
||||
std::list<std::shared_ptr<linphone::ConferenceInfo>> conferenceInfos =
|
||||
defaultAccount->getConferenceInformationList();
|
||||
if (conferenceInfos.empty()) return;
|
||||
if (conferenceInfos.empty()) {
|
||||
endResetModel();
|
||||
return;
|
||||
}
|
||||
items->push_back(nullptr); // Add Dummy conference for today
|
||||
for (auto conferenceInfo : conferenceInfos) {
|
||||
if (conferenceInfo->getState() == linphone::ConferenceInfo::State::Cancelled) {
|
||||
|
|
@ -86,8 +92,9 @@ void ConferenceInfoList::setSelf(QSharedPointer<ConferenceInfoList> me) {
|
|||
mustBeInMainThread(getClassName());
|
||||
for (auto &item : *items) {
|
||||
connectItem(item);
|
||||
mList << item.template objectCast<QObject>();
|
||||
}
|
||||
resetData(*items);
|
||||
endResetModel();
|
||||
delete items;
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1852,65 +1852,65 @@
|
|||
<context>
|
||||
<name>ChatListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="279"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="286"/>
|
||||
<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="281"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="288"/>
|
||||
<source>chat_message_draft_sending_text</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="423"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="430"/>
|
||||
<source>chat_room_delete</source>
|
||||
<extracomment>"Delete"</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="363"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="370"/>
|
||||
<source>chat_room_mute</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="362"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="369"/>
|
||||
<source>chat_room_unmute</source>
|
||||
<extracomment>"Mute"</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="375"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="382"/>
|
||||
<source>chat_room_mark_as_read</source>
|
||||
<extracomment>"Mark as read"</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="394"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="401"/>
|
||||
<source>chat_room_leave</source>
|
||||
<extracomment>"leave"</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="400"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="407"/>
|
||||
<source>chat_list_leave_chat_popup_title</source>
|
||||
<extracomment>leave the conversation ?</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="402"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="409"/>
|
||||
<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 type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="429"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="436"/>
|
||||
<source>chat_list_delete_chat_popup_title</source>
|
||||
<extracomment>Delete the conversation ?</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="431"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="438"/>
|
||||
<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 type="unfinished"></translation>
|
||||
|
|
@ -2153,45 +2153,45 @@ Error</extracomment>
|
|||
<context>
|
||||
<name>ChatMessagesListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="113"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="124"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="112"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="123"/>
|
||||
<source>popup_info_find_message_title</source>
|
||||
<extracomment>Find message</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="126"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="125"/>
|
||||
<source>info_popup_no_result_message</source>
|
||||
<extracomment>No result found</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="118"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="117"/>
|
||||
<source>info_popup_first_result_message</source>
|
||||
<extracomment>First result reached</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="116"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="115"/>
|
||||
<source>info_popup_last_result_message</source>
|
||||
<extracomment>Last result reached</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="162"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="161"/>
|
||||
<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="172"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="171"/>
|
||||
<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="212"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="211"/>
|
||||
<source>chat_message_is_writing_info</source>
|
||||
<extracomment>%1 is writing…</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
|
|
@ -2212,79 +2212,79 @@ Error</extracomment>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="68"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="69"/>
|
||||
<source>chat_dialog_delete_chat_title</source>
|
||||
<extracomment>Supprimer la conversation ?</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="70"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="71"/>
|
||||
<source>chat_dialog_delete_chat_message</source>
|
||||
<extracomment>"La conversation et tous ses messages seront supprimés."</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="99"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="100"/>
|
||||
<source>chat_list_title</source>
|
||||
<extracomment>"Conversations"</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="120"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="121"/>
|
||||
<source>menu_mark_all_as_read</source>
|
||||
<extracomment>"mark all as read"</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="151"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="152"/>
|
||||
<source>chat_search_in_history</source>
|
||||
<extracomment>"Rechercher une conversation"</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="174"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="175"/>
|
||||
<source>list_filter_no_result_found</source>
|
||||
<extracomment>"Aucun résultat…"</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="176"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="177"/>
|
||||
<source>chat_list_empty_history</source>
|
||||
<extracomment>"Aucune conversation dans votre historique"</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="245"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="250"/>
|
||||
<source>chat_action_start_new_chat</source>
|
||||
<extracomment>"New chat"</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="281"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="286"/>
|
||||
<source>chat_start_group_chat_title</source>
|
||||
<extracomment>"Nouveau groupe"</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="283"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="288"/>
|
||||
<source>chat_action_start_group_chat</source>
|
||||
<extracomment>"Créer"</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="309"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="313"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="314"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="318"/>
|
||||
<source>information_popup_error_title</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="311"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="316"/>
|
||||
<source>group_chat_error_must_have_name</source>
|
||||
<extracomment>"Un nom doit être donné au groupe</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="315"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="320"/>
|
||||
<source>group_call_error_not_connected</source>
|
||||
<extracomment>"Vous n'etes pas connecté"</extracomment>
|
||||
<translation type="unfinished">Sie sind nicht verbunden</translation>
|
||||
|
|
@ -4029,13 +4029,13 @@ Error</extracomment>
|
|||
<context>
|
||||
<name>MeetingListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Meeting/MeetingListView.qml" line="276"/>
|
||||
<location filename="../../view/Control/Display/Meeting/MeetingListView.qml" line="277"/>
|
||||
<source>meeting_info_cancelled</source>
|
||||
<extracomment>"Réunion annulée"</extracomment>
|
||||
<translation>Besprechung abgesagt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Meeting/MeetingListView.qml" line="300"/>
|
||||
<location filename="../../view/Control/Display/Meeting/MeetingListView.qml" line="301"/>
|
||||
<source>meetings_list_no_meeting_for_today</source>
|
||||
<extracomment>"Aucune réunion aujourd'hui"</extracomment>
|
||||
<translation>Heute keine Besprechungen</translation>
|
||||
|
|
@ -4300,6 +4300,21 @@ Error</extracomment>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MessageSharedFilesInfos</name>
|
||||
<message>
|
||||
<location filename="../../view/Page/Layout/Chat/MessageSharedFilesInfos.qml" line="39"/>
|
||||
<source>no_shared_medias</source>
|
||||
<extracomment>No media</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Layout/Chat/MessageSharedFilesInfos.qml" line="41"/>
|
||||
<source>no_shared_documents</source>
|
||||
<extracomment>No document</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultimediaSettings</name>
|
||||
<message>
|
||||
|
|
@ -5094,31 +5109,31 @@ Pour les activer dans un projet commercial, merci de nous contacter.</source>
|
|||
<translation>Start a group call ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="431"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="427"/>
|
||||
<source>reply_to_label</source>
|
||||
<extracomment>Reply to %1</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="631"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="627"/>
|
||||
<source>shared_medias_title</source>
|
||||
<extracomment>Shared medias</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="633"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="629"/>
|
||||
<source>shared_documents_title</source>
|
||||
<extracomment>Shared documents</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="662"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="658"/>
|
||||
<source>forward_to_title</source>
|
||||
<extracomment>Forward to…</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="696"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="692"/>
|
||||
<source>conversations_title</source>
|
||||
<extracomment>Conversations</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
|
|
|
|||
|
|
@ -1814,65 +1814,65 @@
|
|||
<context>
|
||||
<name>ChatListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="279"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="286"/>
|
||||
<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="281"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="288"/>
|
||||
<source>chat_message_draft_sending_text</source>
|
||||
<translation>Draft : %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="423"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="430"/>
|
||||
<source>chat_room_delete</source>
|
||||
<extracomment>"Delete"</extracomment>
|
||||
<translation>Delete</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="363"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="370"/>
|
||||
<source>chat_room_mute</source>
|
||||
<translation>Mute</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="362"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="369"/>
|
||||
<source>chat_room_unmute</source>
|
||||
<extracomment>"Mute"</extracomment>
|
||||
<translation>Unmute</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="375"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="382"/>
|
||||
<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="394"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="401"/>
|
||||
<source>chat_room_leave</source>
|
||||
<extracomment>"leave"</extracomment>
|
||||
<translation>Leave</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="400"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="407"/>
|
||||
<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="402"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="409"/>
|
||||
<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="429"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="436"/>
|
||||
<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="431"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="438"/>
|
||||
<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>
|
||||
|
|
@ -2115,38 +2115,38 @@ Error</extracomment>
|
|||
<context>
|
||||
<name>ChatMessagesListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="113"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="124"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="112"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="123"/>
|
||||
<source>popup_info_find_message_title</source>
|
||||
<extracomment>Find message</extracomment>
|
||||
<translation>Find message</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="126"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="125"/>
|
||||
<source>info_popup_no_result_message</source>
|
||||
<extracomment>No result found</extracomment>
|
||||
<translation>No result found</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="118"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="117"/>
|
||||
<source>info_popup_first_result_message</source>
|
||||
<extracomment>First result reached</extracomment>
|
||||
<translation>First result reached</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="116"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="115"/>
|
||||
<source>info_popup_last_result_message</source>
|
||||
<extracomment>Last result reached</extracomment>
|
||||
<translation>Last result reached</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="162"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="161"/>
|
||||
<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="172"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="171"/>
|
||||
<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>
|
||||
|
|
@ -2154,7 +2154,7 @@ Error</extracomment>
|
|||
Only your correspondent can decrypt them.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="212"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="211"/>
|
||||
<source>chat_message_is_writing_info</source>
|
||||
<extracomment>%1 is writing…</extracomment>
|
||||
<translation>%1 is writing…</translation>
|
||||
|
|
@ -2175,79 +2175,79 @@ Only your correspondent can decrypt them.</translation>
|
|||
<translation>No conversation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="68"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="69"/>
|
||||
<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="70"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="71"/>
|
||||
<source>chat_dialog_delete_chat_message</source>
|
||||
<extracomment>"La conversation et tous ses messages seront supprimés."</extracomment>
|
||||
<translation>This conversation and all its messages will be deleted.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="99"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="100"/>
|
||||
<source>chat_list_title</source>
|
||||
<extracomment>"Conversations"</extracomment>
|
||||
<translation>Conversations</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="120"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="121"/>
|
||||
<source>menu_mark_all_as_read</source>
|
||||
<extracomment>"mark all as read"</extracomment>
|
||||
<translation>Mark all as read</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="151"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="152"/>
|
||||
<source>chat_search_in_history</source>
|
||||
<extracomment>"Rechercher une conversation"</extracomment>
|
||||
<translation>Search for a chat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="174"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="175"/>
|
||||
<source>list_filter_no_result_found</source>
|
||||
<extracomment>"Aucun résultat…"</extracomment>
|
||||
<translation>No result…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="176"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="177"/>
|
||||
<source>chat_list_empty_history</source>
|
||||
<extracomment>"Aucune conversation dans votre historique"</extracomment>
|
||||
<translation>No conversation in history</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="245"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="250"/>
|
||||
<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="281"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="286"/>
|
||||
<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="283"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="288"/>
|
||||
<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="309"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="313"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="314"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="318"/>
|
||||
<source>information_popup_error_title</source>
|
||||
<translation>Error</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="311"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="316"/>
|
||||
<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="315"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="320"/>
|
||||
<source>group_call_error_not_connected</source>
|
||||
<extracomment>"Vous n'etes pas connecté"</extracomment>
|
||||
<translation>You are not connected</translation>
|
||||
|
|
@ -3939,13 +3939,13 @@ Expiration : %1</translation>
|
|||
<context>
|
||||
<name>MeetingListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Meeting/MeetingListView.qml" line="276"/>
|
||||
<location filename="../../view/Control/Display/Meeting/MeetingListView.qml" line="277"/>
|
||||
<source>meeting_info_cancelled</source>
|
||||
<extracomment>"Réunion annulée"</extracomment>
|
||||
<translation>Meeting canceled</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Meeting/MeetingListView.qml" line="300"/>
|
||||
<location filename="../../view/Control/Display/Meeting/MeetingListView.qml" line="301"/>
|
||||
<source>meetings_list_no_meeting_for_today</source>
|
||||
<extracomment>"Aucune réunion aujourd'hui"</extracomment>
|
||||
<translation>No meeting for today</translation>
|
||||
|
|
@ -4206,6 +4206,21 @@ Expiration : %1</translation>
|
|||
<translation>Click to delete</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MessageSharedFilesInfos</name>
|
||||
<message>
|
||||
<location filename="../../view/Page/Layout/Chat/MessageSharedFilesInfos.qml" line="39"/>
|
||||
<source>no_shared_medias</source>
|
||||
<extracomment>No media</extracomment>
|
||||
<translation>No media</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Layout/Chat/MessageSharedFilesInfos.qml" line="41"/>
|
||||
<source>no_shared_documents</source>
|
||||
<extracomment>No document</extracomment>
|
||||
<translation>No document</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultimediaSettings</name>
|
||||
<message>
|
||||
|
|
@ -4983,31 +4998,31 @@ To enable them in a commercial project, please contact us.</translation>
|
|||
<translation>Start a group call ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="431"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="427"/>
|
||||
<source>reply_to_label</source>
|
||||
<extracomment>Reply to %1</extracomment>
|
||||
<translation>Reply to %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="631"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="627"/>
|
||||
<source>shared_medias_title</source>
|
||||
<extracomment>Shared medias</extracomment>
|
||||
<translation>Shared medias</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="633"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="629"/>
|
||||
<source>shared_documents_title</source>
|
||||
<extracomment>Shared documents</extracomment>
|
||||
<translation>Shared documents</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="662"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="658"/>
|
||||
<source>forward_to_title</source>
|
||||
<extracomment>Forward to…</extracomment>
|
||||
<translation>Froward to…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="696"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="692"/>
|
||||
<source>conversations_title</source>
|
||||
<extracomment>Conversations</extracomment>
|
||||
<translation>Conversations</translation>
|
||||
|
|
|
|||
|
|
@ -1814,65 +1814,65 @@
|
|||
<context>
|
||||
<name>ChatListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="279"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="286"/>
|
||||
<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="281"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="288"/>
|
||||
<source>chat_message_draft_sending_text</source>
|
||||
<translation>Brouillon : %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="423"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="430"/>
|
||||
<source>chat_room_delete</source>
|
||||
<extracomment>"Delete"</extracomment>
|
||||
<translation>Supprimer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="363"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="370"/>
|
||||
<source>chat_room_mute</source>
|
||||
<translation>Mettre en sourdine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="362"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="369"/>
|
||||
<source>chat_room_unmute</source>
|
||||
<extracomment>"Mute"</extracomment>
|
||||
<translation>Enlever la sourdine </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="375"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="382"/>
|
||||
<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="394"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="401"/>
|
||||
<source>chat_room_leave</source>
|
||||
<extracomment>"leave"</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="407"/>
|
||||
<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="402"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="409"/>
|
||||
<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="429"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="436"/>
|
||||
<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="431"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatListView.qml" line="438"/>
|
||||
<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>
|
||||
|
|
@ -2115,38 +2115,38 @@ Error</extracomment>
|
|||
<context>
|
||||
<name>ChatMessagesListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="113"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="124"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="112"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="123"/>
|
||||
<source>popup_info_find_message_title</source>
|
||||
<extracomment>Find message</extracomment>
|
||||
<translation>Trouver un message</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="126"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="125"/>
|
||||
<source>info_popup_no_result_message</source>
|
||||
<extracomment>No result found</extracomment>
|
||||
<translation>Aucun résultat trouvé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="118"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="117"/>
|
||||
<source>info_popup_first_result_message</source>
|
||||
<extracomment>First result reached</extracomment>
|
||||
<translation>Premier résultat atteint</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="116"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="115"/>
|
||||
<source>info_popup_last_result_message</source>
|
||||
<extracomment>Last result reached</extracomment>
|
||||
<translation>Dernier résultat atteint</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="162"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="161"/>
|
||||
<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="172"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="171"/>
|
||||
<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>
|
||||
|
|
@ -2154,7 +2154,7 @@ Error</extracomment>
|
|||
en bout. Seul votre correspondant peut les déchiffrer.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="212"/>
|
||||
<location filename="../../view/Control/Display/Chat/ChatMessagesListView.qml" line="211"/>
|
||||
<source>chat_message_is_writing_info</source>
|
||||
<extracomment>%1 is writing…</extracomment>
|
||||
<translation>%1 est en train d'écrire…</translation>
|
||||
|
|
@ -2175,79 +2175,79 @@ en bout. Seul votre correspondant peut les déchiffrer.</translation>
|
|||
<translation>Aucune conversation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="68"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="69"/>
|
||||
<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="70"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="71"/>
|
||||
<source>chat_dialog_delete_chat_message</source>
|
||||
<extracomment>"La conversation et tous ses messages seront supprimés."</extracomment>
|
||||
<translation>La conversation et tous ses messages seront supprimés.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="99"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="100"/>
|
||||
<source>chat_list_title</source>
|
||||
<extracomment>"Conversations"</extracomment>
|
||||
<translation>Conversations</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="120"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="121"/>
|
||||
<source>menu_mark_all_as_read</source>
|
||||
<extracomment>"mark all as read"</extracomment>
|
||||
<translation>Tout marquer comme lu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="151"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="152"/>
|
||||
<source>chat_search_in_history</source>
|
||||
<extracomment>"Rechercher une conversation"</extracomment>
|
||||
<translation>Rechercher une conversation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="174"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="175"/>
|
||||
<source>list_filter_no_result_found</source>
|
||||
<extracomment>"Aucun résultat…"</extracomment>
|
||||
<translation>Aucun résultat…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="176"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="177"/>
|
||||
<source>chat_list_empty_history</source>
|
||||
<extracomment>"Aucune conversation dans votre historique"</extracomment>
|
||||
<translation>Aucune conversation dans votre historique</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="245"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="250"/>
|
||||
<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="281"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="286"/>
|
||||
<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="283"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="288"/>
|
||||
<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="309"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="313"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="314"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="318"/>
|
||||
<source>information_popup_error_title</source>
|
||||
<translation>Erreur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="311"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="316"/>
|
||||
<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="315"/>
|
||||
<location filename="../../view/Page/Main/Chat/ChatPage.qml" line="320"/>
|
||||
<source>group_call_error_not_connected</source>
|
||||
<extracomment>"Vous n'etes pas connecté"</extracomment>
|
||||
<translation>Vous n'êtes pas connecté</translation>
|
||||
|
|
@ -3939,13 +3939,13 @@ Expiration : %1</translation>
|
|||
<context>
|
||||
<name>MeetingListView</name>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Meeting/MeetingListView.qml" line="276"/>
|
||||
<location filename="../../view/Control/Display/Meeting/MeetingListView.qml" line="277"/>
|
||||
<source>meeting_info_cancelled</source>
|
||||
<extracomment>"Réunion annulée"</extracomment>
|
||||
<translation>Réunion annulée</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Control/Display/Meeting/MeetingListView.qml" line="300"/>
|
||||
<location filename="../../view/Control/Display/Meeting/MeetingListView.qml" line="301"/>
|
||||
<source>meetings_list_no_meeting_for_today</source>
|
||||
<extracomment>"Aucune réunion aujourd'hui"</extracomment>
|
||||
<translation>Aucune réunion aujourd'hui</translation>
|
||||
|
|
@ -4206,6 +4206,21 @@ Expiration : %1</translation>
|
|||
<translation>Appuyez pour supprimer</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MessageSharedFilesInfos</name>
|
||||
<message>
|
||||
<location filename="../../view/Page/Layout/Chat/MessageSharedFilesInfos.qml" line="39"/>
|
||||
<source>no_shared_medias</source>
|
||||
<extracomment>No media</extracomment>
|
||||
<translation>Aucun média</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Layout/Chat/MessageSharedFilesInfos.qml" line="41"/>
|
||||
<source>no_shared_documents</source>
|
||||
<extracomment>No document</extracomment>
|
||||
<translation>Aucun document</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultimediaSettings</name>
|
||||
<message>
|
||||
|
|
@ -4983,31 +4998,31 @@ Pour les activer dans un projet commercial, merci de nous contacter.</translatio
|
|||
<translation>Démarrer un appel de groupe ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="431"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="427"/>
|
||||
<source>reply_to_label</source>
|
||||
<extracomment>Reply to %1</extracomment>
|
||||
<translation>Réponse à %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="631"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="627"/>
|
||||
<source>shared_medias_title</source>
|
||||
<extracomment>Shared medias</extracomment>
|
||||
<translation>Médias partagés</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="633"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="629"/>
|
||||
<source>shared_documents_title</source>
|
||||
<extracomment>Shared documents</extracomment>
|
||||
<translation>Documents partagés</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="662"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="658"/>
|
||||
<source>forward_to_title</source>
|
||||
<extracomment>Forward to…</extracomment>
|
||||
<translation>Transférer à…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="696"/>
|
||||
<location filename="../../view/Page/Form/Chat/SelectedChatView.qml" line="692"/>
|
||||
<source>conversations_title</source>
|
||||
<extracomment>Conversations</extracomment>
|
||||
<translation>Conversations</translation>
|
||||
|
|
|
|||
|
|
@ -52,11 +52,28 @@ QDateTime ChatModel::getLastUpdateTime() {
|
|||
return QDateTime::fromSecsSinceEpoch(mMonitor->getLastUpdateTime());
|
||||
}
|
||||
|
||||
std::list<std::shared_ptr<linphone::ChatMessage>> ChatModel::getHistory() const {
|
||||
std::list<std::shared_ptr<linphone::Content>> ChatModel::getSharedMedias() const {
|
||||
return mMonitor->getMediaContents();
|
||||
}
|
||||
|
||||
std::list<std::shared_ptr<linphone::Content>> ChatModel::getSharedDocuments() const {
|
||||
return mMonitor->getDocumentContents();
|
||||
}
|
||||
|
||||
std::list<std::shared_ptr<linphone::EventLog>> ChatModel::getHistory() const {
|
||||
int filter = mMonitor->hasCapability((int)linphone::ChatRoom::Capabilities::Conference)
|
||||
? static_cast<int>(linphone::ChatRoom::HistoryFilter::ChatMessage) |
|
||||
static_cast<int>(linphone::ChatRoom::HistoryFilter::InfoNoDevice)
|
||||
: static_cast<int>(linphone::ChatRoom::HistoryFilter::ChatMessage);
|
||||
return mMonitor->getHistory(0, filter);
|
||||
}
|
||||
|
||||
std::list<std::shared_ptr<linphone::ChatMessage>> ChatModel::getChatMessageHistory() const {
|
||||
auto history = mMonitor->getHistory(0, (int)linphone::ChatRoom::HistoryFilter::ChatMessage);
|
||||
std::list<std::shared_ptr<linphone::ChatMessage>> res;
|
||||
for (auto &eventLog : history) {
|
||||
if (!eventLog->getChatMessage()) res.push_back(eventLog->getChatMessage());
|
||||
auto chatMessage = eventLog->getChatMessage();
|
||||
if (chatMessage) res.push_back(chatMessage);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
@ -106,7 +123,7 @@ int ChatModel::getUnreadMessagesCount() const {
|
|||
|
||||
void ChatModel::markAsRead() {
|
||||
mMonitor->markAsRead();
|
||||
for (auto &message : getHistory()) {
|
||||
for (auto &message : getChatMessageHistory()) {
|
||||
message->markAsRead();
|
||||
}
|
||||
emit messagesRead();
|
||||
|
|
|
|||
|
|
@ -46,7 +46,10 @@ public:
|
|||
bool hasCapability(int capability) const;
|
||||
int getUnreadMessagesCount() const;
|
||||
void markAsRead();
|
||||
std::list<std::shared_ptr<linphone::ChatMessage>> getHistory() const;
|
||||
std::list<std::shared_ptr<linphone::Content>> getSharedMedias() const;
|
||||
std::list<std::shared_ptr<linphone::Content>> getSharedDocuments() const;
|
||||
std::list<std::shared_ptr<linphone::EventLog>> getHistory() const;
|
||||
std::list<std::shared_ptr<linphone::ChatMessage>> getChatMessageHistory() const;
|
||||
QString getIdentifier() const;
|
||||
void deleteHistory();
|
||||
void deleteMessage(std::shared_ptr<linphone::ChatMessage> message);
|
||||
|
|
|
|||
|
|
@ -81,10 +81,7 @@ ColumnLayout {
|
|||
anchors.left: selectedItemFlag.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
elide: Text.ElideRight
|
||||
font {
|
||||
pixelSize: Typography.p1.pixelSize
|
||||
weight: Typography.p1.weight
|
||||
}
|
||||
font: Typography.p1
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ Item {
|
|||
height: busyIndicator.height
|
||||
Control.BusyIndicator {
|
||||
id: busyIndicator
|
||||
width: Math.round(60 * DefaultStyle.dp)
|
||||
height: width
|
||||
running: mainItem.visible
|
||||
anchors.centerIn: mainItem
|
||||
contentItem: EffectImage {
|
||||
|
|
|
|||
|
|
@ -18,17 +18,20 @@ ListView {
|
|||
property real busyIndicatorSize: Math.round(60 * DefaultStyle.dp)
|
||||
|
||||
property ChatGui currentChatGui: model.getAt(currentIndex) || null
|
||||
property ChatGui chatToSelect: null
|
||||
onChatToSelectChanged: {
|
||||
var index = chatProxy.findChatIndex(chatToSelect)
|
||||
if (index != -1) {
|
||||
currentIndex = index
|
||||
chatToSelect = null
|
||||
}
|
||||
}
|
||||
|
||||
onChatClicked: (chat) => {selectChat(chat)}
|
||||
|
||||
signal resultsReceived()
|
||||
signal markAllAsRead()
|
||||
signal chatClicked(ChatGui chat)
|
||||
|
||||
onResultsReceived: {
|
||||
loading = false
|
||||
// contentY = 0
|
||||
}
|
||||
|
||||
model: ChatProxy {
|
||||
id: chatProxy
|
||||
Component.onCompleted: {
|
||||
|
|
@ -41,7 +44,10 @@ ListView {
|
|||
2 * mainItem.height / (Math.round(56 * DefaultStyle.dp)))
|
||||
displayItemsStep: 3 * initialDisplayItems / 2
|
||||
onModelReset: {
|
||||
mainItem.resultsReceived()
|
||||
loading = false
|
||||
if (mainItem.chatToSelect) {
|
||||
selectChat(mainItem.chatToSelect)
|
||||
}
|
||||
}
|
||||
onModelAboutToBeReset: {
|
||||
loading = true
|
||||
|
|
@ -160,6 +166,7 @@ ListView {
|
|||
}
|
||||
|
||||
delegate: FocusScope {
|
||||
visible: !mainItem.loading
|
||||
width: mainItem.width
|
||||
height: Math.round(63 * DefaultStyle.dp)
|
||||
Connections {
|
||||
|
|
|
|||
|
|
@ -93,8 +93,7 @@ ListView {
|
|||
markIndexAsRead(index)
|
||||
}
|
||||
}
|
||||
Component.onCompleted: loading = true
|
||||
onListAboutToBeReset: loading = true
|
||||
onModelAboutToBeReset: loading = true
|
||||
onModelReset: Qt.callLater(function() {
|
||||
loading = false
|
||||
var index = eventLogProxy.findFirstUnreadIndex()
|
||||
|
|
@ -130,7 +129,7 @@ ListView {
|
|||
}
|
||||
|
||||
footer: Item {
|
||||
visible: mainItem.chat && mainItem.chat.core.isEncrypted && !eventLogProxy.haveMore
|
||||
visible: mainItem.chat && !mainItem.loading && mainItem.chat.core.isEncrypted && !eventLogProxy.haveMore
|
||||
height: visible ? headerMessage.height + headerMessage.topMargin + headerMessage.bottomMargin : Math.round(30 * DefaultStyle.dp)
|
||||
width: headerMessage.width
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
|
@ -216,6 +215,7 @@ ListView {
|
|||
|
||||
BusyIndicator {
|
||||
anchors.horizontalCenter: mainItem.horizontalCenter
|
||||
anchors.verticalCenter: mainItem.verticalCenter
|
||||
visible: mainItem.loading
|
||||
height: visible ? mainItem.busyIndicatorSize : 0
|
||||
width: mainItem.busyIndicatorSize
|
||||
|
|
@ -226,11 +226,11 @@ ListView {
|
|||
|
||||
delegate: DelegateChooser {
|
||||
role: "eventType"
|
||||
|
||||
DelegateChoice {
|
||||
roleValue: "chatMessage"
|
||||
delegate: ChatMessage {
|
||||
id: chatMessageDelegate
|
||||
visible: !mainItem.loading
|
||||
property int yoff: Math.round(chatMessageDelegate.y - mainItem.contentY)
|
||||
property bool isFullyVisible: (yoff > mainItem.y && yoff + height < mainItem.y + mainItem.height)
|
||||
chatMessage: modelData.core.chatMessageGui
|
||||
|
|
@ -288,6 +288,7 @@ ListView {
|
|||
roleValue: "event"
|
||||
delegate: Item {
|
||||
id: eventDelegate
|
||||
visible: !mainItem.loading
|
||||
property int yoff: Math.round(eventDelegate.y - mainItem.contentY)
|
||||
property bool isFullyVisible: (yoff > mainItem.y && yoff + height < mainItem.y + mainItem.height)
|
||||
onIsFullyVisibleChanged: {
|
||||
|
|
@ -312,6 +313,7 @@ ListView {
|
|||
roleValue: "ephemeralEvent"
|
||||
delegate: Item {
|
||||
id: ephemeralEventDelegate
|
||||
visible: !mainItem.loading
|
||||
property int yoff: Math.round(ephemeralEventDelegate.y - mainItem.contentY)
|
||||
property bool isFullyVisible: (yoff > mainItem.y && yoff + height < mainItem.y + mainItem.height)
|
||||
onIsFullyVisibleChanged: {
|
||||
|
|
|
|||
|
|
@ -72,7 +72,17 @@ Item {
|
|||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
Image {
|
||||
visible: thumbnailSource.isImage
|
||||
anchors.fill: image
|
||||
z: image.z + 1
|
||||
visible: image.status == Image.Error || image.status == Image.Null
|
||||
source: AppIcons.fileImage
|
||||
sourceSize.width: mainItem.width
|
||||
sourceSize.height: mainItem.height
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
Image {
|
||||
id: image
|
||||
visible: thumbnailSource.isImage && status !== Image.Loading
|
||||
mipmap: false//SettingsModel.mipmapEnabled
|
||||
source: mainItem.thumbnail
|
||||
sourceSize.width: mainItem.width
|
||||
|
|
@ -80,15 +90,6 @@ Item {
|
|||
autoTransform: true
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
anchors.fill: parent
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
z: parent.z + 1
|
||||
visible: parent.status !== Image.Ready
|
||||
source: AppIcons.fileImage
|
||||
sourceSize.width: mainItem.width
|
||||
sourceSize.height: mainItem.height
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
visible: thumbnailSource.isVideo
|
||||
|
|
|
|||
|
|
@ -160,6 +160,7 @@ ListView {
|
|||
|
||||
delegate: FocusScope {
|
||||
id: itemDelegate
|
||||
visible: !mainItem.loading
|
||||
height: Math.round(63 * DefaultStyle.dp) + (!isFirst && dateDay.visible ? topOffset : 0)
|
||||
width: mainItem.width
|
||||
enabled: !isCanceled && haveModel
|
||||
|
|
|
|||
|
|
@ -63,10 +63,6 @@ FocusScope {
|
|||
anchors.fill: parent
|
||||
spacing: 0
|
||||
|
||||
//onEventChanged: {
|
||||
// TODO : call when all messages read after scroll to unread feature available
|
||||
// if (chat) chat.core.lMarkAsRead()
|
||||
//}
|
||||
MainRightPanel {
|
||||
id: splitPanel
|
||||
Layout.fillWidth: true
|
||||
|
|
|
|||
|
|
@ -34,10 +34,7 @@ ColumnLayout {
|
|||
}
|
||||
Text {
|
||||
text: mainItem.title
|
||||
font {
|
||||
pixelSize: Typography.h4.pixelSize
|
||||
weight: Typography.h4.weight
|
||||
}
|
||||
font: Typography.h4
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -48,7 +45,6 @@ ColumnLayout {
|
|||
spacing: Math.round(21 * DefaultStyle.dp)
|
||||
TabBar {
|
||||
id: tabbar
|
||||
onCurrentIndexChanged: console.log("current index", currentIndex)
|
||||
visible: mainItem.tabbarModel !== undefined
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredWidth: implicitWidth
|
||||
|
|
|
|||
|
|
@ -19,9 +19,26 @@ MessageInfosLayout {
|
|||
Layout.preferredHeight: contentHeight
|
||||
cellWidth: mainItem.filter === ChatMessageFileProxy.FilterContentType.Documents ? width : width / 4
|
||||
cellHeight: mainItem.filter === ChatMessageFileProxy.FilterContentType.Documents ? Math.round(69 * DefaultStyle.dp) : width / 4
|
||||
property bool loading: true
|
||||
model: ChatMessageFileProxy {
|
||||
chat: mainItem.chatGui
|
||||
filterType: mainItem.filter
|
||||
onModelAboutToBeReset: gridView.loading = true
|
||||
onModelReset: gridView.loading = false
|
||||
}
|
||||
BusyIndicator {
|
||||
anchors.centerIn: parent
|
||||
visible: gridView.loading
|
||||
}
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
visible: !gridView.loading && gridView.count === 0
|
||||
font: Typography.p2l
|
||||
text: mainItem.filter === ChatMessageFileProxy.FilterContentType.Medias
|
||||
//: No media
|
||||
? qsTr("no_shared_medias")
|
||||
//: No document
|
||||
: qsTr("no_shared_documents")
|
||||
}
|
||||
delegate: FileView {
|
||||
contentGui: modelData
|
||||
|
|
|
|||
|
|
@ -641,7 +641,7 @@ Item {
|
|||
}
|
||||
function onOpenChatRequested(chat) {
|
||||
console.log("open chat requested, open", chat.core.title)
|
||||
chatPage.selectedChatGui = chat
|
||||
chatPage.openChatRequested(chat)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ AbstractMainPage {
|
|||
&& listStackView.currentItem.objectName != "newChatItem")
|
||||
listStackView.push(newChatItem)
|
||||
}
|
||||
signal openChatRequested(ChatGui chat)
|
||||
|
||||
Dialog {
|
||||
id: deleteChatPopup
|
||||
|
|
@ -193,9 +194,13 @@ AbstractMainPage {
|
|||
|
||||
Connections {
|
||||
target: mainItem
|
||||
onSelectedChatGuiChanged: {
|
||||
function onSelectedChatGuiChanged() {
|
||||
console.log("selected chat gui changed")
|
||||
chatListView.selectChat(mainItem.selectedChatGui)
|
||||
}
|
||||
function onOpenChatRequested(chat) {
|
||||
chatListView.chatToSelect = chat
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue