[geary/wip/721828-undo] Make revoke button insensitive as soon as started
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/721828-undo] Make revoke button insensitive as soon as started
- Date: Sat, 3 Jan 2015 01:04:05 +0000 (UTC)
commit d782571866068aed0ab4bc70717731d78c0d2170
Author: Jim Nelson <jim yorba org>
Date: Fri Jan 2 17:03:42 2015 -0800
Make revoke button insensitive as soon as started
.../imap-engine/imap-engine-revokable-move.vala | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/engine/imap-engine/imap-engine-revokable-move.vala
b/src/engine/imap-engine/imap-engine-revokable-move.vala
index d1a58ee..52cb45b 100644
--- a/src/engine/imap-engine/imap-engine-revokable-move.vala
+++ b/src/engine/imap-engine/imap-engine-revokable-move.vala
@@ -43,6 +43,10 @@ private class Geary.ImapEngine.RevokableMove : Revokable {
}
private async bool internal_revoke_async(Cancellable? cancellable) throws Error {
+ // at this point, it's a one-shot deal: any error from here on out, or success, revoke
+ // is completed
+ can_revoke = false;
+
// moving from original destination to original source
MinimalFolder? dest_folder = null;
try {
@@ -53,16 +57,15 @@ private class Geary.ImapEngine.RevokableMove : Revokable {
}
if (dest_folder == null)
- return can_revoke = false;
+ return can_revoke;
// open, revoke, close, ensuring the close and signal disconnect are performed in all cases
try {
yield dest_folder.open_async(Geary.Folder.OpenFlags.NONE, cancellable);
// watch out for messages detected as gone when folder is opened
- if (can_revoke) {
+ if (destination_ids.size > 0) {
yield dest_folder.revoke_move_async(destination_ids, original_source, cancellable);
- can_revoke = false;
// there's not a super-reliable way to wait until the delete of the message in this
// folder has completed; could wait for the UID to be reported deleted, but it's
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]