Skip to content

Commit 22a1564

Browse files
committed
use standard debounce on message composer
1 parent 61a7849 commit 22a1564

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/packages/frontend/editors/markdown-input/multimode.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const multimodeStateCache = new LRU<string, MultimodeState>({ max: 500 });
5050
const Modes = ["markdown", "editor"] as const;
5151
export type Mode = (typeof Modes)[number];
5252

53+
5354
const LOCAL_STORAGE_KEY = "markdown-editor-mode";
5455

5556
function getLocalStorageMode(): Mode | undefined {

src/packages/frontend/messages/compose.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import { MAX_BLOB_SIZE } from "@cocalc/util/db-schema/blobs";
2929
import { human_readable_size } from "@cocalc/util/misc";
3030
import SelectUsers from "./select-users";
3131
import Zoom from "./zoom";
32+
import { SAVE_DEBOUNCE_MS } from "@cocalc/frontend/frame-editors/code-editor/const";
3233

3334
export default function Compose({
3435
onCancel,
@@ -346,7 +347,7 @@ export default function Compose({
346347
isFocused={bodyIsFocused}
347348
editorDivRef={editorDivRef}
348349
getValueRef={getValueRef}
349-
saveDebounceMs={200}
350+
saveDebounceMs={SAVE_DEBOUNCE_MS}
350351
value={body}
351352
onChange={(body) => {
352353
const syncstring = syncstringRef.current;

0 commit comments

Comments
 (0)