Small improvements

pull/147/head
M66B 7 years ago
parent 783bdd68ed
commit 0f8e958935

@ -1217,7 +1217,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
for (EntityAttachment attachment : attachments) for (EntityAttachment attachment : attachments)
if (EntityAttachment.PGP_MESSAGE.equals(attachment.encryption)) { if (EntityAttachment.PGP_MESSAGE.equals(attachment.encryption)) {
if (!attachment.available) if (!attachment.available)
throw new IllegalArgumentException(getString(R.string.title_attachments_missing)); throw new IllegalArgumentException(context.getString(R.string.title_attachments_missing));
File file = EntityAttachment.getFile(context, attachment.id); File file = EntityAttachment.getFile(context, attachment.id);
encrypted = new BufferedInputStream(new FileInputStream(file)); encrypted = new BufferedInputStream(new FileInputStream(file));
@ -1246,7 +1246,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
} }
if (encrypted == null) if (encrypted == null)
throw new IllegalArgumentException(getString(R.string.title_not_encrypted)); throw new IllegalArgumentException(context.getString(R.string.title_not_encrypted));
ByteArrayOutputStream decrypted = new ByteArrayOutputStream(); ByteArrayOutputStream decrypted = new ByteArrayOutputStream();

@ -635,7 +635,7 @@ public class FragmentAccount extends FragmentBase {
} }
if (!inbox) if (!inbox)
throw new IllegalArgumentException(getString(R.string.title_no_inbox)); throw new IllegalArgumentException(context.getString(R.string.title_no_inbox));
if (!archive && altArchive != null) if (!archive && altArchive != null)
altArchive.type = EntityFolder.ARCHIVE; altArchive.type = EntityFolder.ARCHIVE;
if (!drafts && altDrafts != null) if (!drafts && altDrafts != null)

@ -1543,7 +1543,7 @@ public class FragmentCompose extends FragmentBase {
if (drafts == null) if (drafts == null)
drafts = db.folder().getPrimaryDrafts(); drafts = db.folder().getPrimaryDrafts();
if (drafts == null) if (drafts == null)
throw new IllegalArgumentException(getString(R.string.title_no_primary_drafts)); throw new IllegalArgumentException(context.getString(R.string.title_no_primary_drafts));
String body = ""; String body = "";

@ -208,7 +208,7 @@ public class FragmentFolder extends FragmentBase {
Log.i("Creating folder=" + name); Log.i("Creating folder=" + name);
if (TextUtils.isEmpty(name)) if (TextUtils.isEmpty(name))
throw new IllegalArgumentException(getString(R.string.title_folder_name_missing)); throw new IllegalArgumentException(context.getString(R.string.title_folder_name_missing));
EntityFolder create = new EntityFolder(); EntityFolder create = new EntityFolder();
create.account = aid; create.account = aid;
@ -323,7 +323,7 @@ public class FragmentFolder extends FragmentBase {
int count = db.operation().getOperationCount(id, null); int count = db.operation().getOperationCount(id, null);
if (count > 0) if (count > 0)
throw new IllegalArgumentException( throw new IllegalArgumentException(
getResources().getQuantityString( context.getResources().getQuantityString(
R.plurals.title_notification_operations, count, count)); R.plurals.title_notification_operations, count, count));
db.folder().setFolderTbd(id); db.folder().setFolderTbd(id);

Loading…
Cancel
Save