Commit 41337b0d authored by Rayan Osseiran's avatar Rayan Osseiran Committed by Adrien Béraud

account import: enable push notifications if enabled in the app

Change-Id: Ia9206f943ba10ee3ad4f4d3fccf73e99dec71aef
Gitlab: #594
parent bb471d67
......@@ -91,6 +91,11 @@ public class AccountWizardPresenter extends RootPresenter<AccountWizardView> {
public void initRingAccountLink(AccountCreationModel accountCreationModel, String defaultAccountName) {
Single<Map<String, String>> newAccount = initRingAccountDetails(defaultAccountName)
.map(accountDetails -> {
Settings settings = mPreferences.getSettings();
if(settings != null && settings.isAllowPushNotifications()) {
accountCreationModel.setPush(true);
accountDetails.put(ConfigKey.PROXY_ENABLED.key(), AccountConfig.TRUE_STR);
}
if (!accountCreationModel.getPassword().isEmpty()) {
accountDetails.put(ConfigKey.ARCHIVE_PASSWORD.key(), accountCreationModel.getPassword());
}
......
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