@@ -35,6 +35,7 @@ import {
3535 mergeGlobalSectionWithAccessor ,
3636 mergePersonalSectionsWithAccessor ,
3737} from "~/utils/getLeftSidebarSettings" ;
38+ import { sectionsToBlockProps } from "./settings/LeftSidebarPersonalSettings" ;
3839import discourseConfigRef , { notify } from "~/utils/discourseConfigRef" ;
3940import { getLeftSidebarSettings } from "~/utils/getLeftSidebarSettings" ;
4041import {
@@ -382,6 +383,10 @@ const PersonalSections = ({
382383 ...config ,
383384 personal : { ...config . personal , sections : reordered } ,
384385 } ) ;
386+ setPersonalSetting (
387+ [ PERSONAL_KEYS . leftSidebar ] ,
388+ sectionsToBlockProps ( reordered ) ,
389+ ) ;
385390 void moveRoamBlockToIndex ( {
386391 blockUid : moved . uid ,
387392 parentUid : config . personal . uid ,
@@ -414,6 +419,10 @@ const PersonalSections = ({
414419 ...config ,
415420 personal : { ...config . personal , sections : newSections } ,
416421 } ) ;
422+ setPersonalSetting (
423+ [ PERSONAL_KEYS . leftSidebar ] ,
424+ sectionsToBlockProps ( newSections ) ,
425+ ) ;
417426 void moveRoamBlockToIndex ( {
418427 blockUid : child . uid ,
419428 parentUid : section . childrenUid ,
@@ -704,6 +713,10 @@ const LeftSidebarView = ({
704713 ...config ,
705714 global : { ...config . global , children : reordered } ,
706715 } ) ;
716+ setGlobalSetting (
717+ [ GLOBAL_KEYS . leftSidebar , LEFT_SIDEBAR_KEYS . children ] ,
718+ reordered . map ( ( c ) => c . text ) ,
719+ ) ;
707720 void moveRoamBlockToIndex ( {
708721 blockUid : moved . uid ,
709722 parentUid : config . global . childrenUid ,
0 commit comments