Merge pull request #5359 from k9mail/remove_schedulePusherRefresh
Remove unused K9JobManager.schedulePusherRefresh()
This commit is contained in:
commit
7ea4365cda
4 changed files with 2 additions and 21 deletions
|
@ -609,11 +609,8 @@ public class Account implements BaseAccount {
|
|||
return folderPushMode;
|
||||
}
|
||||
|
||||
public synchronized boolean setFolderPushMode(FolderMode pushMode) {
|
||||
FolderMode oldPushMode = folderPushMode;
|
||||
|
||||
public synchronized void setFolderPushMode(FolderMode pushMode) {
|
||||
folderPushMode = pushMode;
|
||||
return pushMode != oldPushMode;
|
||||
}
|
||||
|
||||
public synchronized boolean isNotifySync() {
|
||||
|
|
|
@ -20,10 +20,6 @@ class K9JobManager(
|
|||
mailSyncWorkerManager.scheduleMailSync(account)
|
||||
}
|
||||
|
||||
fun schedulePusherRefresh() {
|
||||
// Push is temporarily disabled. See GH-4253
|
||||
}
|
||||
|
||||
private fun scheduleMailSync() {
|
||||
cancelAllMailSyncJobs()
|
||||
|
||||
|
|
|
@ -534,10 +534,6 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener
|
|||
|
||||
if (resultCode == RESULT_OK) {
|
||||
if (Intent.ACTION_EDIT.equals(getIntent().getAction())) {
|
||||
boolean isPushCapable = messagingController.isPushCapable(mAccount);
|
||||
if (isPushCapable && mAccount.getFolderPushMode() != FolderMode.NONE) {
|
||||
jobManager.schedulePusherRefresh();
|
||||
}
|
||||
Preferences.getPreferences(getApplicationContext()).saveAccount(mAccount);
|
||||
finish();
|
||||
} else {
|
||||
|
|
|
@ -165,11 +165,7 @@ class AccountSettingsDataStore(
|
|||
reschedulePoll()
|
||||
}
|
||||
}
|
||||
"folder_push_mode" -> {
|
||||
if (account.setFolderPushMode(Account.FolderMode.valueOf(value))) {
|
||||
restartPushers()
|
||||
}
|
||||
}
|
||||
"folder_push_mode" -> account.folderPushMode = Account.FolderMode.valueOf(value)
|
||||
"delete_policy" -> account.deletePolicy = Account.DeletePolicy.valueOf(value)
|
||||
"expunge_policy" -> account.expungePolicy = Account.Expunge.valueOf(value)
|
||||
"max_push_folders" -> account.maxPushFolders = value.toInt()
|
||||
|
@ -214,10 +210,6 @@ class AccountSettingsDataStore(
|
|||
jobManager.scheduleMailSync(account)
|
||||
}
|
||||
|
||||
private fun restartPushers() {
|
||||
jobManager.schedulePusherRefresh()
|
||||
}
|
||||
|
||||
private fun extractFolderId(preferenceValue: String): Long? {
|
||||
val folderValue = preferenceValue.substringAfter(FolderListPreference.FOLDER_VALUE_DELIMITER)
|
||||
return if (folderValue == FolderListPreference.NO_FOLDER_VALUE) null else folderValue.toLongOrNull()
|
||||
|
|
Loading…
Reference in a new issue