mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-10-30 07:53:33 +08:00
Compare commits
3 Commits
nightly/20
...
nightly/20
| Author | SHA1 | Date | |
|---|---|---|---|
| e8075a412e | |||
| 4d55a1430d | |||
| 8de099e38d |
2
daemon
2
daemon
Submodule daemon updated: 85549fce49...459e58a6d2
@ -166,7 +166,6 @@ DISTRIBUTIONS := \
|
||||
debian_unstable \
|
||||
ubuntu_20.04 \
|
||||
ubuntu_22.04 \
|
||||
ubuntu_22.10 \
|
||||
ubuntu_23.04 \
|
||||
fedora_37 \
|
||||
fedora_38 \
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
FROM ubuntu:22.10
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get clean
|
||||
RUN apt-get update && \
|
||||
apt-get install -y -o Acquire::Retries=10 \
|
||||
devscripts \
|
||||
equivs \
|
||||
python-is-python3 \
|
||||
wget
|
||||
|
||||
ADD extras/packaging/gnu-linux/scripts/prebuild-package-debian.sh /opt/prebuild-package-debian.sh
|
||||
|
||||
COPY extras/packaging/gnu-linux/rules/debian-qt/control /tmp/builddeps/debian/control
|
||||
RUN /opt/prebuild-package-debian.sh qt-deps
|
||||
|
||||
COPY extras/packaging/gnu-linux/rules/debian/control /tmp/builddeps/debian/control
|
||||
RUN /opt/prebuild-package-debian.sh jami-deps
|
||||
|
||||
ADD extras/packaging/gnu-linux/scripts/build-package-debian.sh /opt/build-package-debian.sh
|
||||
CMD ["/opt/build-package-debian.sh"]
|
||||
@ -99,8 +99,6 @@ if [ -f /etc/os-release ]; then
|
||||
ENDTAG="ubuntu_20.04"
|
||||
elif [ "${UBUNTU_CODENAME}" = "jammy" ] || [ "${ID}_${VERSION_ID}" = "ubuntu_22.04" ]; then
|
||||
ENDTAG="ubuntu_22.04"
|
||||
elif [ "${UBUNTU_CODENAME}" = "kinetic" ] || [ "${ID}_${VERSION_ID}" = "ubuntu_22.10" ]; then
|
||||
ENDTAG="ubuntu_22.10"
|
||||
elif [ "${UBUNTU_CODENAME}" = "lunar" ] || [ "${ID}_${VERSION_ID}" = "ubuntu_23.04" ]; then
|
||||
ENDTAG="ubuntu_23.04"
|
||||
elif [ "${ID}" = "debian" ] && \
|
||||
|
||||
@ -228,6 +228,18 @@ Popup {
|
||||
}
|
||||
}
|
||||
|
||||
MessageOptionButton {
|
||||
visible: type === Interaction.Type.DATA_TRANSFER && Status === Interaction.Status.TRANSFER_FINISHED
|
||||
textButton: JamiStrings.removeLocally
|
||||
iconSource: JamiResources.trash_black_24dp_svg
|
||||
Layout.fillWidth: true
|
||||
Layout.margins: 5
|
||||
onClicked: {
|
||||
MessagesAdapter.removeFile(msgId, root.location)
|
||||
close()
|
||||
}
|
||||
}
|
||||
|
||||
MessageOptionButton {
|
||||
id: buttonEdit
|
||||
|
||||
|
||||
@ -496,6 +496,7 @@ Item {
|
||||
// Context Menu
|
||||
property string saveFile: qsTr("Save file")
|
||||
property string openLocation: qsTr("Open location")
|
||||
property string removeLocally: qsTr("Delete file from device")
|
||||
|
||||
// Updates
|
||||
property string betaInstall: qsTr("Install beta version")
|
||||
|
||||
@ -299,6 +299,13 @@ MessagesAdapter::openDirectory(const QString& path)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MessagesAdapter::removeFile(const QString& interactionId, const QString& path)
|
||||
{
|
||||
auto convUid = lrcInstance_->get_selectedConvUid();
|
||||
lrcInstance_->getCurrentConversationModel()->removeFile(convUid, interactionId, path);
|
||||
}
|
||||
|
||||
void
|
||||
MessagesAdapter::acceptFile(const QString& interactionId)
|
||||
{
|
||||
|
||||
@ -111,6 +111,7 @@ protected:
|
||||
Q_INVOKABLE void cancelFile(const QString& arg);
|
||||
Q_INVOKABLE void openUrl(const QString& url);
|
||||
Q_INVOKABLE void openDirectory(const QString& arg);
|
||||
Q_INVOKABLE void removeFile(const QString& interactionId, const QString& path);
|
||||
Q_INVOKABLE void deleteInteraction(const QString& interactionId);
|
||||
Q_INVOKABLE void joinCall(const QString& uri,
|
||||
const QString& deviceId,
|
||||
|
||||
@ -306,6 +306,9 @@ public:
|
||||
void getTransferInfo(const QString& conversationId,
|
||||
const QString& interactionId,
|
||||
api::datatransfer::Info& info) const;
|
||||
void removeFile(const QString& conversationId,
|
||||
const QString& interactionId,
|
||||
const QString& path);
|
||||
|
||||
/**
|
||||
* Starts a search of all medias in a conversation
|
||||
|
||||
@ -3384,8 +3384,7 @@ ConversationModelPimpl::slotNewCall(const QString& fromId, const QString& callId
|
||||
// in case if we receive call after removing contact add conversation request;
|
||||
try {
|
||||
auto contact = linked.owner.contactModel->getContact(fromId);
|
||||
if (!isOutgoing && !contact.isBanned
|
||||
&& fromId != linked.owner.profileInfo.uri) {
|
||||
if (!isOutgoing && !contact.isBanned && fromId != linked.owner.profileInfo.uri) {
|
||||
addContactRequest(fromId);
|
||||
}
|
||||
if (isOutgoing && contact.profileInfo.type == profile::Type::TEMPORARY) {
|
||||
@ -4049,6 +4048,26 @@ ConversationModel::getTransferInfo(const QString& conversationId,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ConversationModel::removeFile(const QString& conversationId,
|
||||
const QString& interactionId,
|
||||
const QString& path)
|
||||
{
|
||||
auto convOpt = getConversationForUid(conversationId);
|
||||
if (!convOpt)
|
||||
return;
|
||||
|
||||
QFile::remove(path);
|
||||
|
||||
std::lock_guard<std::mutex> lk(pimpl_->interactionsLocks[convOpt->get().uid]);
|
||||
auto& interactions = convOpt->get().interactions;
|
||||
auto it = interactions->find(interactionId);
|
||||
if (it != interactions->end()) {
|
||||
it->second.status = interaction::Status::TRANSFER_AWAITING_HOST;
|
||||
interactions->emitDataChanged(it, {MessageList::Role::Status});
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
ConversationModel::getNumberOfUnreadMessagesFor(const QString& convUid)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user