22//---------------------------------------------------------------
33// Helper functions for WindowTools plugin
44// Jonathan Clark
5- // last update 2025-10-26 for v1.4.0 by @jgclark
5+ // last update 2025-11-07 for v1.4.0 by @jgclark
66//---------------------------------------------------------------
77
88import pluginJson from '../plugin.json'
@@ -11,7 +11,8 @@ import { toLocaleDateTimeString } from '@helpers/dateTime'
1111import { clo , isObjectEmpty , JSP , logDebug , logError , logInfo , logWarn } from '@helpers/dev'
1212import { displayTitle } from '@helpers/general'
1313import { getOrMakeRegularNoteInFolder } from '@helpers/NPnote'
14- import { MAIN_SIDEBAR_CONTROL_BUILD_VERSION , closeSidebar , openSidebar , constrainWindowSizeAndPosition } from '@helpers/NPWindows'
14+ import { usersVersionHas } from '@helpers/NPVersions'
15+ import { closeSidebar , openSidebar , constrainWindowSizeAndPosition } from '@helpers/NPWindows'
1516import { caseInsensitiveMatch } from '@helpers/search'
1617import { showMessage , showMessageYesNo } from '@helpers/userInput'
1718
@@ -466,7 +467,7 @@ export async function getDetailedWindowSetByName(name: string): Promise<WindowSe
466467 */
467468export function setMainSidebarWidthFromSettings ( settings : WindowSetsConfig ) : void {
468469 // Set main sidebar width if we can control it
469- if ( NotePlan . environment . buildVersion >= MAIN_SIDEBAR_CONTROL_BUILD_VERSION ) {
470+ if ( usersVersionHas ( 'mainSidebarControl' ) ) {
470471 const defaultMainSidebarWidth = settings . defaultMainSidebarWidth ?? NaN
471472 logDebug ( pluginJson , `- Setting main sidebar width to ${ String ( defaultMainSidebarWidth ) } ` )
472473 if ( isNaN ( defaultMainSidebarWidth ) ) {
0 commit comments