mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 17:46:18 +08:00
feat(editor): replace slot with rxjs subject (#10768)
This commit is contained in:
@@ -87,7 +87,7 @@ export const getInlineRangeProvider: (
|
||||
const inlineRange$: InlineRangeProvider['inlineRange$'] = signal(null);
|
||||
|
||||
editorHost.disposables.add(
|
||||
selectionManager.slots.changed.on(selections => {
|
||||
selectionManager.slots.changed.subscribe(selections => {
|
||||
if (!isActiveInEditor(editorHost)) return;
|
||||
|
||||
const textSelection = selections.find(s => s.type === 'text') as
|
||||
|
||||
@@ -313,7 +313,7 @@ export class RangeBinding {
|
||||
|
||||
constructor(public manager: RangeManager) {
|
||||
this.host.disposables.add(
|
||||
this.selectionManager.slots.changed.on(this._onStdSelectionChanged)
|
||||
this.selectionManager.slots.changed.subscribe(this._onStdSelectionChanged)
|
||||
);
|
||||
|
||||
this.host.disposables.addFromEvent(
|
||||
|
||||
Reference in New Issue
Block a user