a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

tweak selection logic and remove logs

+10 -14
+2 -3
components/TextBlock.tsx
··· 57 57 ?.focus(); 58 58 let previousBlockEditor = 59 59 useEditorStates.getState()[prevBlock]?.editor; 60 - console.log(previousBlockEditor); 61 60 if (previousBlockEditor) { 62 61 let tr = previousBlockEditor.tr; 63 - let endPos = previousBlockEditor.doc.content.size; 62 + let endPos = tr.doc.content.size; 64 63 65 64 let newState = previousBlockEditor.apply( 66 65 tr.setSelection( 67 - TextSelection.create(previousBlockEditor.doc, endPos), 66 + TextSelection.create(tr.doc, endPos - 1, endPos - 1), 68 67 ), 69 68 ); 70 69 useEditorStates.setState((s) => ({
+8 -11
replicache/serverMutationContext.ts
··· 86 86 ); 87 87 }, 88 88 async deleteEntity(entity) { 89 - console.log(entity); 90 - console.log( 91 - await Promise.all([ 92 - tx.delete(entities).where(driz.eq(entities.id, entity)), 93 - tx 94 - .delete(facts) 95 - .where( 96 - driz.sql`(data->>'type' = 'ordered-reference' or data ->>'type' = 'reference') and data->>'value' = ${entity}`, 97 - ), 98 - ]), 99 - ); 89 + await Promise.all([ 90 + tx.delete(entities).where(driz.eq(entities.id, entity)), 91 + tx 92 + .delete(facts) 93 + .where( 94 + driz.sql`(data->>'type' = 'ordered-reference' or data ->>'type' = 'reference') and data->>'value' = ${entity}`, 95 + ), 96 + ]); 100 97 }, 101 98 }; 102 99 return ctx;