sceyt-chat-react-uikit 1.8.5 → 1.8.6-beta.2

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/index.js CHANGED
@@ -21570,7 +21570,9 @@ var addPendingMessage = function addPendingMessage(message, messageCopy, channel
21570
21570
  }));
21571
21571
  updateChannelLastMessageOnAllChannels(channelId, nextLastMessage);
21572
21572
  }
21573
- store.dispatch(addMessagesAC([messageToAdd], 'next'));
21573
+ if (getActiveChannelId() === channelId) {
21574
+ store.dispatch(addMessagesAC([messageToAdd], 'next'));
21575
+ }
21574
21576
  };
21575
21577
  var addConfirmedMessageToCache = function addConfirmedMessageToCache(channelId, message) {
21576
21578
  addMessageToMap(channelId, message);
@@ -45570,7 +45572,7 @@ var createMessageMarkerBatcher = function createMessageMarkerBatcher(_ref) {
45570
45572
 
45571
45573
  var _templateObject$P, _templateObject2$K, _templateObject3$C, _templateObject4$x, _templateObject5$s, _templateObject6$o, _templateObject7$m, _templateObject8$k, _templateObject9$h, _templateObject0$g, _templateObject1$e, _templateObject10$b, _templateObject11$8;
45572
45574
  var MessageList = function MessageList(_ref) {
45573
- var _scrollRef$current, _scrollRef$current2;
45575
+ var _scrollRef$current, _scrollRef$current$of, _scrollRef$current2;
45574
45576
  var fontFamily = _ref.fontFamily,
45575
45577
  _ref$ownMessageOnRigh = _ref.ownMessageOnRightSide,
45576
45578
  ownMessageOnRightSide = _ref$ownMessageOnRigh === void 0 ? true : _ref$ownMessageOnRigh,
@@ -46212,7 +46214,7 @@ var MessageList = function MessageList(_ref) {
46212
46214
  id: 'draggingContainer',
46213
46215
  draggable: true,
46214
46216
  onDragLeave: handleDragOut,
46215
- topOffset: (_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 ? void 0 : _scrollRef$current.offsetTop,
46217
+ topOffset: ((_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 ? void 0 : (_scrollRef$current$of = _scrollRef$current.offsetParent) === null || _scrollRef$current$of === void 0 ? void 0 : _scrollRef$current$of.offsetTop) || 0,
46216
46218
  height: (_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 ? void 0 : _scrollRef$current2.offsetHeight,
46217
46219
  backgroundColor: backgroundColor || background
46218
46220
  }, /*#__PURE__*/React__default.createElement(DropAttachmentArea, {
package/index.modern.js CHANGED
@@ -21569,7 +21569,9 @@ var addPendingMessage = function addPendingMessage(message, messageCopy, channel
21569
21569
  }));
21570
21570
  updateChannelLastMessageOnAllChannels(channelId, nextLastMessage);
21571
21571
  }
21572
- store.dispatch(addMessagesAC([messageToAdd], 'next'));
21572
+ if (getActiveChannelId() === channelId) {
21573
+ store.dispatch(addMessagesAC([messageToAdd], 'next'));
21574
+ }
21573
21575
  };
21574
21576
  var addConfirmedMessageToCache = function addConfirmedMessageToCache(channelId, message) {
21575
21577
  addMessageToMap(channelId, message);
@@ -45569,7 +45571,7 @@ var createMessageMarkerBatcher = function createMessageMarkerBatcher(_ref) {
45569
45571
 
45570
45572
  var _templateObject$P, _templateObject2$K, _templateObject3$C, _templateObject4$x, _templateObject5$s, _templateObject6$o, _templateObject7$m, _templateObject8$k, _templateObject9$h, _templateObject0$g, _templateObject1$e, _templateObject10$b, _templateObject11$8;
45571
45573
  var MessageList = function MessageList(_ref) {
45572
- var _scrollRef$current, _scrollRef$current2;
45574
+ var _scrollRef$current, _scrollRef$current$of, _scrollRef$current2;
45573
45575
  var fontFamily = _ref.fontFamily,
45574
45576
  _ref$ownMessageOnRigh = _ref.ownMessageOnRightSide,
45575
45577
  ownMessageOnRightSide = _ref$ownMessageOnRigh === void 0 ? true : _ref$ownMessageOnRigh,
@@ -46211,7 +46213,7 @@ var MessageList = function MessageList(_ref) {
46211
46213
  id: 'draggingContainer',
46212
46214
  draggable: true,
46213
46215
  onDragLeave: handleDragOut,
46214
- topOffset: (_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 ? void 0 : _scrollRef$current.offsetTop,
46216
+ topOffset: ((_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 ? void 0 : (_scrollRef$current$of = _scrollRef$current.offsetParent) === null || _scrollRef$current$of === void 0 ? void 0 : _scrollRef$current$of.offsetTop) || 0,
46215
46217
  height: (_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 ? void 0 : _scrollRef$current2.offsetHeight,
46216
46218
  backgroundColor: backgroundColor || background
46217
46219
  }, /*#__PURE__*/React__default.createElement(DropAttachmentArea, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sceyt-chat-react-uikit",
3
- "version": "1.8.5",
3
+ "version": "1.8.6-beta.2",
4
4
  "description": "Interactive React UI Components for Sceyt Chat.",
5
5
  "author": "Sceyt",
6
6
  "license": "MIT",