Merge lp:~tintou/pantheon-mail/poa-no-overwrite into lp:~elementary-apps/pantheon-mail/trunk

Proposed by Corentin Noël
Status: Merged
Approved by: Cody Garver
Approved revision: 2166
Merged at revision: 2167
Proposed branch: lp:~tintou/pantheon-mail/poa-no-overwrite
Merge into: lp:~elementary-apps/pantheon-mail/trunk
Diff against target: 22 lines (+10/-2)
1 file modified
src/engine/api/OnlineAccountsWrapper.vala (+10/-2)
To merge this branch: bzr merge lp:~tintou/pantheon-mail/poa-no-overwrite
Reviewer Review Type Date Requested Status
elementary Apps team Pending
Review via email: mp+305596@code.launchpad.net

Commit message

Don't overwrite custom settings not available in the POA plugin.

To post a comment you must log in.
Revision history for this message
Rico Tzschichholz (ricotz) wrote :

Cache retrieved (property-) values instead of getting them twice or more.

2166. By Corentin Noël

Don't overwrite custom settings not available in the POA plugin.

Revision history for this message
Corentin Noël (tintou) wrote :

done

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/engine/api/OnlineAccountsWrapper.vala'
2--- src/engine/api/OnlineAccountsWrapper.vala 2016-07-30 10:18:28 +0000
3+++ src/engine/api/OnlineAccountsWrapper.vala 2016-09-13 13:12:28 +0000
4@@ -70,8 +70,16 @@
5
6
7 string real_name = Environment.get_real_name();
8- account_information.real_name = real_name == "Unknown" ? "" : real_name;
9- account_information.nickname = user_name;
10+ var actual_real_name = account_information.real_name;
11+ if (actual_real_name == null || actual_real_name == "") {
12+ account_information.real_name = real_name == "Unknown" ? "" : real_name;
13+ }
14+
15+ var actual_nickname = account_information.nickname;
16+ if (actual_nickname == null || actual_nickname == "") {
17+ account_information.nickname = user_name;
18+ }
19+
20 account_information.imap_remember_password = true;
21 account_information.smtp_remember_password = true;
22 account_information.service_provider = Geary.ServiceProvider.OTHER;

Subscribers

People subscribed via source and target branches