Skip to content

Commit

Permalink
[TF][PUSH] Enable push in migration case
Browse files Browse the repository at this point in the history
  • Loading branch information
thermatk committed Aug 2, 2020
1 parent bedd956 commit eb4762f
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,16 @@ public static void startPushService() {
enabled = preferences.getBoolean("pushService", true);
} else {
enabled = MessagesController.getMainSettings(UserConfig.selectedAccount).getBoolean("keepAliveService", true);
SharedPreferences.Editor editor = preferences.edit();
editor.putBoolean("pushService", enabled);
editor.putBoolean("pushConnection", enabled);
editor.commit();
SharedPreferences preferencesCA = MessagesController.getNotificationsSettings(UserConfig.selectedAccount);
SharedPreferences.Editor editorCA = preferencesCA.edit();
editorCA.putBoolean("pushConnection", enabled);
editorCA.putBoolean("pushService", enabled);
editorCA.commit();
ConnectionsManager.getInstance(UserConfig.selectedAccount).setPushConnectionEnabled(true);
}
if (enabled) {
Log.d("TFOSS", "Trying to start push service every 10 minutes");
Expand Down

0 comments on commit eb4762f

Please sign in to comment.