Merge pull request #5412 from artbristol/art/no_push_class_local_folder

Do not show push mode for local folders
This commit is contained in:
cketti 2021-07-14 15:57:15 +02:00 committed by GitHub
commit d2ddff565b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,6 +110,7 @@ class FolderSettingsFragment : PreferenceFragmentCompat(), ConfirmationDialogFra
private fun setPreferenceVisibility(folderSettings: FolderSettingsData) {
if (folderSettings.folder.isLocalOnly) {
requirePreference<Preference>(PREFERENCE_POLL_CLASS).isVisible = false
requirePreference<Preference>(PREFERENCE_PUSH_CLASS).isVisible = false
requirePreference<Preference>(PREFERENCE_NOTIFICATION_CLASS).isVisible = false
}
}
@ -140,6 +141,7 @@ class FolderSettingsFragment : PreferenceFragmentCompat(), ConfirmationDialogFra
private const val PREFERENCE_TOP_CATEGORY = "folder_settings"
private const val PREFERENCE_POLL_CLASS = "folder_settings_folder_sync_mode"
private const val PREFERENCE_PUSH_CLASS = "folder_settings_folder_push_mode"
private const val PREFERENCE_NOTIFICATION_CLASS = "folder_settings_folder_notify_mode"
}
}