Commit 8ee768fb authored by Michael Gratton's avatar Michael Gratton 🤞

Init Folks in the backgroud to prevent blocking the UI on startup

Fixes #347
parent 37059950
Pipeline #71553 passed with stages
in 37 minutes
......@@ -263,11 +263,16 @@ public class GearyController : Geary.BaseObject {
Folks.IndividualAggregator individuals =
Folks.IndividualAggregator.dup();
if (!individuals.is_prepared) {
try {
yield individuals.prepare();
} catch (GLib.Error err) {
error("Error preparing Folks: %s", err.message);
}
// Do this in the background since it can take a long time
// on some systems and the GUI shouldn't be blocked by it
individuals.prepare.begin((obj, res) => {
try {
individuals.prepare.end(res);
} catch (GLib.Error err) {
warning("Error preparing Folks: %s", err.message);
}
});
}
this.avatar_store = new Application.AvatarStore(individuals);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment