Skip to content

Commit 51c01da

Browse files
committed
JS-8843: fix
1 parent 161630e commit 51c01da

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

src/json/text.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2716,7 +2716,7 @@
27162716

27172717
"notificationMode0": "All messages",
27182718
"notificationMode1": "Mentions only",
2719-
"notificationMode2": "Disable all",
2719+
"notificationMode2": "Mute and hide",
27202720
"notificationMode3": "Custom",
27212721

27222722
"filterTemplate0": "Value template",

src/ts/component/editor/page.tsx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1412,7 +1412,25 @@ const EditorPage = observer(forwardRef<I.BlockRef, Props>((props, ref) => {
14121412
};
14131413
C.BlockListTurnInto(rootId, [ block.id ], map[block.content.style]);
14141414
} else
1415-
if (block.isTextList() || block.isTextQuote() || block.isTextCallout()) {
1415+
if (block.isTextList()) {
1416+
const parent = S.Block.getParentLeaf(rootId, block.id);
1417+
const parentElement = S.Block.getParentMapElement(rootId, block.id);
1418+
const canOutdent = parent && parentElement && parent.canHaveChildren() && block.isIndentable();
1419+
1420+
if (canOutdent) {
1421+
e.preventDefault();
1422+
1423+
const idx = parentElement.childrenIds.indexOf(block.id);
1424+
1425+
Action.move(rootId, rootId, parent.id, [ block.id ], I.BlockPosition.Bottom, () => {
1426+
Action.move(rootId, rootId, block.id, parentElement.childrenIds.slice(idx), I.BlockPosition.Inner);
1427+
focus.setWithTimeout(block.id, { from: range.from, to: range.to }, 50);
1428+
});
1429+
} else {
1430+
C.BlockListTurnInto(rootId, [ block.id ], I.TextStyle.Paragraph);
1431+
};
1432+
} else
1433+
if (block.isTextQuote() || block.isTextCallout()) {
14161434
C.BlockListTurnInto(rootId, [ block.id ], I.TextStyle.Paragraph);
14171435
} else {
14181436
ids.length ? blockRemove(block) : blockMerge(block, -1, length);

src/ts/lib/util/data.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,8 +1285,20 @@ class UtilData {
12851285
};
12861286

12871287
getWidgetChats(): any[] {
1288+
const spaceview = U.Space.getSpaceview();
1289+
12881290
return S.Record.getRecords(J.Constant.subId.chat).filter(it => {
12891291
const counters = S.Chat.getChatCounters(S.Common.space, it.id);
1292+
const mode = U.Object.getChatNotificationMode(spaceview, it.id);
1293+
1294+
if (mode == I.NotificationMode.All) {
1295+
return true;
1296+
};
1297+
1298+
if (mode == I.NotificationMode.Nothing) {
1299+
return false;
1300+
};
1301+
12901302
return (counters.messageCounter > 0) || (counters.mentionCounter > 0);
12911303
});
12921304
};

0 commit comments

Comments
 (0)