@poolse/react-native 2.26.0 → 2.28.0
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.
- package/dist/index.cjs +14 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1489,8 +1489,8 @@ var styles7 = reactNative.StyleSheet.create({
|
|
|
1489
1489
|
});
|
|
1490
1490
|
function LiveCallBanner({ call, inCall, onJoin }) {
|
|
1491
1491
|
const theme = usePoolseTheme();
|
|
1492
|
-
const what = call.media === "video" ? "Video call in progress" : "Voice call in progress";
|
|
1493
|
-
const who = inCall > 0 ? `${inCall} on the call` : "Ringing";
|
|
1492
|
+
const what = call.kind === "room" ? call.media === "video" ? "Video room" : "Voice room" : call.media === "video" ? "Video call in progress" : "Voice call in progress";
|
|
1493
|
+
const who = inCall > 0 ? `${inCall} ${call.kind === "room" ? "in the room" : "on the call"}` : call.kind === "room" ? "Starting" : "Ringing";
|
|
1494
1494
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1495
1495
|
reactNative.View,
|
|
1496
1496
|
{
|
|
@@ -4265,6 +4265,8 @@ function ConversationView({
|
|
|
4265
4265
|
const theme = usePoolseTheme();
|
|
4266
4266
|
const { me } = react$1.useMe();
|
|
4267
4267
|
const meId = me?.id ?? null;
|
|
4268
|
+
const receiptsVisible = react$1.receiptsOf(me).visible;
|
|
4269
|
+
const showReadState = readReceipts && receiptsVisible;
|
|
4268
4270
|
const {
|
|
4269
4271
|
messages,
|
|
4270
4272
|
loading,
|
|
@@ -4343,9 +4345,15 @@ function ConversationView({
|
|
|
4343
4345
|
const custom = renderMessage(msg, meId);
|
|
4344
4346
|
if (custom !== null && custom !== void 0) return custom;
|
|
4345
4347
|
}
|
|
4346
|
-
const readState =
|
|
4348
|
+
const readState = showReadState && meId !== null && msg.sender_id === meId ? readStateForMessage(msg, members, meId, sequenceByMessageId) : void 0;
|
|
4347
4349
|
const isSelf = meId !== null && msg.sender_id === meId;
|
|
4348
|
-
const canEdit =
|
|
4350
|
+
const canEdit = react$1.canEditOwnMessage({
|
|
4351
|
+
isSelf,
|
|
4352
|
+
deleted: !!msg.deleted_at,
|
|
4353
|
+
receiptsVisible,
|
|
4354
|
+
readState,
|
|
4355
|
+
insertedAt: msg.inserted_at
|
|
4356
|
+
});
|
|
4349
4357
|
const groupPosition = groupPositionById.get(msg.id) ?? "standalone";
|
|
4350
4358
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4351
4359
|
MessageRow,
|
|
@@ -4379,6 +4387,8 @@ function ConversationView({
|
|
|
4379
4387
|
renderMessage,
|
|
4380
4388
|
meId,
|
|
4381
4389
|
readReceipts,
|
|
4390
|
+
showReadState,
|
|
4391
|
+
receiptsVisible,
|
|
4382
4392
|
members,
|
|
4383
4393
|
reactions,
|
|
4384
4394
|
attachments,
|