Clean up ImapDB.Account ctor/open API a bit
Move args from open_async to ctor and use these to determine and store DB file and attachment paths as properties. This allows constructing the DB instance up front and markig it as non-nullable, simplifies calling patterns and hence allows removing one use of the deprecated Engine singleton, and by moving in the local data deletion implementation from ImapEngine.GenericAccount, also allows removing a static helper method.
This commit is contained in:
parent
5e13dd0abd
commit
66a664f98d
5 changed files with 79 additions and 73 deletions
|
|
@ -40,10 +40,12 @@ class Geary.ImapDB.FolderTest : TestCase {
|
|||
new Geary.RFC822.MailboxAddress(null, "test@example.com")
|
||||
);
|
||||
|
||||
this.account = new Account(config);
|
||||
this.account.open_async.begin(
|
||||
this.account = new Account(
|
||||
config,
|
||||
this.tmp_dir,
|
||||
GLib.File.new_for_path(_SOURCE_ROOT_DIR).get_child("sql"),
|
||||
GLib.File.new_for_path(_SOURCE_ROOT_DIR).get_child("sql")
|
||||
);
|
||||
this.account.open_async.begin(
|
||||
null,
|
||||
(obj, ret) => { async_complete(ret); }
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue