@bcc-code/vue-bcc-chat-ui 7.0.32 → 7.0.34

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.
@@ -4638,7 +4638,7 @@ function R0({ environment: e }) {
4638
4638
  if (!q || w.value.length > 0)
4639
4639
  return;
4640
4640
  const c = q.getConversations();
4641
- c.length !== 0 && (w.value = Pt(c), !I.value && w.value.length > 0 && (I.value = w.value[0].id, et(I.value)));
4641
+ c.length !== 0 && (w.value = Pt(c), !I.value && w.value.length > 0 && et(I.value));
4642
4642
  }
4643
4643
  function et(c) {
4644
4644
  if (!q || !c)
@@ -4689,7 +4689,7 @@ function R0({ environment: e }) {
4689
4689
  }
4690
4690
  }
4691
4691
  async function ku(c) {
4692
- I.value = c, B.value = null, A.value = [], Ne = null, D.value = !1, Z.value = null, Y.value = null, et(c), await Yt();
4692
+ console.log("Selecting conversation", c), I.value = c, B.value = null, A.value = [], Ne = null, D.value = !1, Z.value = null, Y.value = null, et(c), await Yt();
4693
4693
  }
4694
4694
  function fn(c) {
4695
4695
  c && (Y.value = null), Z.value = c;
@@ -5110,10 +5110,10 @@ function R0({ environment: e }) {
5110
5110
  return;
5111
5111
  }
5112
5112
  try {
5113
- await Iu({ reset: !0 }), w.value = w.value.map((x) => x.id !== c.id ? x : {
5113
+ await Iu({ reset: !0 }), w.value = w.value.map((x) => x.id !== c.id ? x : (console.log("Resetting unread count for conversation", c.id), {
5114
5114
  ...x,
5115
5115
  unreadCount: 0
5116
- }), q == null || q.setConversations(w.value);
5116
+ })), q == null || q.setConversations(w.value);
5117
5117
  } catch (x) {
5118
5118
  const E = (q == null ? void 0 : q.getMessages(c.id)) ?? [];
5119
5119
  if (E.length > 0) {
@@ -5368,14 +5368,14 @@ function R0({ environment: e }) {
5368
5368
  if (g.value)
5369
5369
  return;
5370
5370
  const b = (R = (E = (x = c.getSender) == null ? void 0 : x.call(c)) == null ? void 0 : E.getUid) == null ? void 0 : R.call(E);
5371
- !b || b === (($ = p.value) == null ? void 0 : $.uid) || (H = c.getReadByMeAt) != null && H.call(c) || (Cu(), await V.markAsRead(c));
5371
+ !b || b === (($ = p.value) == null ? void 0 : $.uid) || (H = c.getReadByMeAt) != null && H.call(c) || (Cu(), console.log("Marking message as read: ", { message: c }), await V.markAsRead(c));
5372
5372
  }
5373
5373
  async function ee(c) {
5374
5374
  var x, E, R, $, H;
5375
5375
  if (g.value)
5376
5376
  return;
5377
5377
  const b = (R = (E = (x = c.getSender) == null ? void 0 : x.call(c)) == null ? void 0 : E.getUid) == null ? void 0 : R.call(E);
5378
- !b || b === (($ = p.value) == null ? void 0 : $.uid) || (H = c.getDeliveredToMeAt) != null && H.call(c) || (Cu(), await V.markAsDelivered(c));
5378
+ !b || b === (($ = p.value) == null ? void 0 : $.uid) || (H = c.getDeliveredToMeAt) != null && H.call(c) || (Cu(), console.log("Marking message as delivered: ", { message: c }), await V.markAsDelivered(c));
5379
5379
  }
5380
5380
  async function v(c) {
5381
5381
  if (g.value)
@@ -5498,12 +5498,12 @@ function R0({ environment: e }) {
5498
5498
  }
5499
5499
  function yn(c) {
5500
5500
  w.value = Pt(
5501
- w.value.map((b) => b.id !== c.conversationId ? b : {
5501
+ w.value.map((b) => b.id !== c.conversationId ? b : (console.log("Updating conversation preview from local message: ", { message: c, conversation: b }), {
5502
5502
  ...b,
5503
5503
  subtitle: In(c),
5504
5504
  lastMessageAt: c.sentAt,
5505
5505
  unreadCount: 0
5506
- })
5506
+ }))
5507
5507
  ), q == null || q.setConversations(w.value);
5508
5508
  }
5509
5509
  function ou(c) {