Skip to content

Commit 7a92843

Browse files
Add validator registration for continuous scroll toggle
1 parent 75c422f commit 7a92843

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/main.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ export async function activate(context: ExecutionActivationContext): Promise<voi
141141
},
142142
);
143143

144+
const continuousScrollValidatorRegistration = await papi.projectSettings.registerValidator(
145+
'interlinearizer.continuousScroll',
146+
async (newValue) => typeof newValue === 'boolean',
147+
);
148+
144149
const webViewOpenUnsubscriber = papi.webViews.onDidOpenWebView(({ webView }) => {
145150
if (webView.webViewType !== mainWebViewType || !webView.projectId) return;
146151
openWebViewsByProject.set(webView.projectId, webView.id);
@@ -155,6 +160,7 @@ export async function activate(context: ExecutionActivationContext): Promise<voi
155160
context.registrations.add(
156161
mainWebViewProviderRegistration,
157162
openForWebViewCommandRegistration,
163+
continuousScrollValidatorRegistration,
158164
webViewOpenUnsubscriber,
159165
webViewCloseUnsubscriber,
160166
);

0 commit comments

Comments
 (0)