aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/file_manager.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-07-16 21:15:47 +0200
committerfiaxh <git@lightrise.org>2019-07-16 21:15:47 +0200
commit30353e92d63c033857ad0396c921b3bf5cab44c3 (patch)
treeec80b9a1b778605643145a2eaecc5632152f1da4 /libdino/src/service/file_manager.vala
parent4b15c444db839a0117dd5ee2704c378d0fcb2fd1 (diff)
parent4b6fe6bf7f86f665238d709c30a777dbc6c81acf (diff)
downloaddino-30353e92d63c033857ad0396c921b3bf5cab44c3.tar.gz
dino-30353e92d63c033857ad0396c921b3bf5cab44c3.zip
Merge branch 'gsoc_0' of https://github.com/hrxi/dino into hrxi-gsoc_0
Diffstat (limited to 'libdino/src/service/file_manager.vala')
-rw-r--r--libdino/src/service/file_manager.vala5
1 files changed, 4 insertions, 1 deletions
diff --git a/libdino/src/service/file_manager.vala b/libdino/src/service/file_manager.vala
index 6f8ccee4..7665936c 100644
--- a/libdino/src/service/file_manager.vala
+++ b/libdino/src/service/file_manager.vala
@@ -66,6 +66,7 @@ public class FileManager : StreamInteractionModule, Object {
foreach (FileSender file_sender in file_senders) {
if (file_sender.can_send(conversation, file_transfer)) {
file_sender.send_file(conversation, file_transfer);
+ break;
}
}
received_file(file_transfer, conversation);
@@ -120,7 +121,9 @@ public class FileManager : StreamInteractionModule, Object {
}
public void add_sender(FileSender file_sender) {
- file_senders.add(file_sender);
+ // Order file_senders in reverse order of adding them -- HTTP is added
+ // later than Jingle.
+ file_senders.insert(0, file_sender);
file_sender.upload_available.connect((account) => {
upload_available(account);
});