[geary: 6/9] Minor leftover code cleanup.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary: 6/9] Minor leftover code cleanup.
- Date: Tue, 6 Mar 2018 05:30:22 +0000 (UTC)
commit ab346b8f379dfeb39b48d9d1bb1522d71f408127
Author: Michael James Gratton <mike vee net>
Date: Wed Feb 21 16:45:14 2018 +1100
Minor leftover code cleanup.
src/engine/imap-db/outbox/smtp-outbox-folder.vala | 13 ++++++-------
.../imap-engine/imap-engine-email-prefetcher.vala | 4 ++--
2 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/src/engine/imap-db/outbox/smtp-outbox-folder.vala
b/src/engine/imap-db/outbox/smtp-outbox-folder.vala
index 70085b9..b649781 100644
--- a/src/engine/imap-db/outbox/smtp-outbox-folder.vala
+++ b/src/engine/imap-db/outbox/smtp-outbox-folder.vala
@@ -34,15 +34,14 @@ private class Geary.SmtpOutboxFolder :
public Memory.Buffer? message;
public SmtpOutboxEmailIdentifier outbox_id;
- public OutboxRow(int64 id, int position, int64 ordering, bool sent, Memory.Buffer? message,
- SmtpOutboxFolderRoot root) {
+ public OutboxRow(int64 id, int position, int64 ordering, bool sent, Memory.Buffer? message) {
assert(position >= 1);
this.id = id;
this.position = position;
this.ordering = ordering;
- this.message = message;
this.sent = sent;
+ this.message = message;
outbox_id = new SmtpOutboxEmailIdentifier(id, ordering);
}
@@ -217,7 +216,7 @@ private class Geary.SmtpOutboxFolder :
int position = do_get_position_by_ordering(cx, ordering, cancellable);
- row = new OutboxRow(id, position, ordering, false, message, _path);
+ row = new OutboxRow(id, position, ordering, false, message);
email_count = do_get_email_count(cx, cancellable);
return Db.TransactionOutcome.COMMIT;
@@ -369,7 +368,7 @@ private class Geary.SmtpOutboxFolder :
}
list.add(row_to_email(new OutboxRow(results.rowid_at(0), position, ordering,
- results.bool_at(3), results.string_buffer_at(2), _path)));
+ results.bool_at(3), results.string_buffer_at(2))));
position += flags.is_newest_to_oldest() ? -1 : 1;
assert(position >= 1);
} while (results.next());
@@ -607,7 +606,7 @@ private class Geary.SmtpOutboxFolder :
int position = 1;
while (!results.finished) {
list.add(new OutboxRow(results.rowid_at(0), position++, results.int64_at(1),
- false, results.string_buffer_at(2), _path));
+ false, results.string_buffer_at(2)));
results.next(cancellable);
}
@@ -852,7 +851,7 @@ private class Geary.SmtpOutboxFolder :
return null;
return new OutboxRow(results.rowid_at(0), position, ordering, results.bool_at(2),
- results.string_buffer_at(1), _path);
+ results.string_buffer_at(1));
}
private void do_mark_email_as_sent(Db.Connection cx, SmtpOutboxEmailIdentifier id, Cancellable?
cancellable)
diff --git a/src/engine/imap-engine/imap-engine-email-prefetcher.vala
b/src/engine/imap-engine/imap-engine-email-prefetcher.vala
index 37c3a40..88af5ac 100644
--- a/src/engine/imap-engine/imap-engine-email-prefetcher.vala
+++ b/src/engine/imap-engine/imap-engine-email-prefetcher.vala
@@ -19,8 +19,8 @@ private class Geary.ImapEngine.EmailPrefetcher : Geary.BaseObject {
public Nonblocking.CountingSemaphore active_sem { get; private set;
default = new Nonblocking.CountingSemaphore(null); }
-
- private unowned ImapEngine.MinimalFolder folder;
+
+ private weak ImapEngine.MinimalFolder folder;
private Nonblocking.Mutex mutex = new Nonblocking.Mutex();
private Gee.TreeSet<Geary.Email> prefetch_emails = new Gee.TreeSet<Geary.Email>(
Email.compare_recv_date_descending);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]