Check if synchronization enable

This commit is contained in:
M66B
2019-02-18 15:50:36 +00:00
parent 7467e88d93
commit 966e3ab20b
4 changed files with 20 additions and 2 deletions

View File

@@ -2092,6 +2092,10 @@ public class FragmentCompose extends FragmentBase {
if (!attachment.available)
throw new IllegalArgumentException(context.getString(R.string.title_attachments_missing));
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
if (!prefs.getBoolean("enabled", true))
throw new IllegalArgumentException(context.getString(R.string.title_sync_disabled));
// Delete draft (cannot move to outbox)
EntityOperation.queue(context, db, draft, EntityOperation.DELETE);