react-native-email-imap-smtp 0.3.32 → 0.3.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -348,7 +348,7 @@ class EmailImapSmtp : HybridEmailImapSmtpSpec() {
348
348
  // fullData=false(列表阶段):只取元数据,不读附件内容,避免列表下载全部附件
349
349
  val info =
350
350
  if (fullData) readAttachmentData(part as BodyPart, fileName, contentId, isInline, disp)
351
- else readAttachmentMeta(part, fileName, contentId, isInline, disp)
351
+ else readAttachmentMeta(part as BodyPart, fileName, contentId, isInline, disp)
352
352
  if (isInline && contentId != null) {
353
353
  onEmbedded(fileName)
354
354
  }
@@ -1038,7 +1038,7 @@ class EmailImapSmtp : HybridEmailImapSmtpSpec() {
1038
1038
  return Promise.async {
1039
1039
  val folder = ensureFolderOpen()
1040
1040
  // 批量:解析目标邮件(本地代理,不触发网络)后一次 STORE 设置 SEEN
1041
- val msgs = uids.mapNotNull { uid ->
1041
+ val msgs = uids.toList().mapNotNull { uid ->
1042
1042
  try { folder.getMessageByUID(uid.toLong()) } catch (_: Exception) { null }
1043
1043
  }
1044
1044
  if (msgs.isEmpty()) return@async
@@ -1055,7 +1055,7 @@ class EmailImapSmtp : HybridEmailImapSmtpSpec() {
1055
1055
  override fun imapMarkAsFlagged(uids: DoubleArray, flagged: Boolean): Promise<Unit> {
1056
1056
  return Promise.async {
1057
1057
  val folder = ensureFolderOpen()
1058
- val msgs = uids.mapNotNull { uid ->
1058
+ val msgs = uids.toList().mapNotNull { uid ->
1059
1059
  try { folder.getMessageByUID(uid.toLong()) } catch (_: Exception) { null }
1060
1060
  }
1061
1061
  if (msgs.isEmpty()) return@async
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-email-imap-smtp",
3
- "version": "0.3.32",
3
+ "version": "0.3.33",
4
4
  "description": "The best of imap and smtp client of react native",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",