Update last_activity before received_file signal to keep UI in sync (#811)

Fixes #791 where a signal to update the UI is sent to
late when sending files, resulting in an out of sync
conversations list.
This commit is contained in:
kmq 2020-04-18 15:18:25 +00:00 committed by GitHub
parent fcad6720e6
commit 2419bf3b15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -63,6 +63,7 @@ public class FileManager : StreamInteractionModule, Object {
yield save_file(file_transfer);
file_transfer.persist(db);
conversation.last_active = file_transfer.time;
received_file(file_transfer, conversation);
} catch (Error e) {
file_transfer.state = FileTransfer.State.FAILED;
@ -113,7 +114,6 @@ public class FileManager : StreamInteractionModule, Object {
yield file_sender.send_file(conversation, file_transfer, file_send_data, file_meta);
conversation.last_active = file_transfer.time;
} catch (Error e) {
warning("Send file error: %s", e.message);
file_transfer.state = FileTransfer.State.FAILED;