| @@ -346,8 +346,16 @@ | ||
| 346 | 346 | : array(); |
| 347 | 347 | $server_file_openers = function_exists( 'openstation_build_file_openers_payload' ) |
| 348 | 348 | ? openstation_build_file_openers_payload() |
| 349 | 349 | : array(); |
| 350 | + // Entries in the menu payload carry dependency handles; their | |
| 351 | + // payloads ride once in `scriptDepPayloads` (GH#892). The file | |
| 352 | + // lists stay whole: no sync module reads them on the client, and | |
| 353 | + // compacting them here was the only write to the map after the | |
| 354 | + // menu payload froze its own, so a refresh could not match it. | |
| 355 | + $script_dep_payloads = isset( $menu_payload['scriptDepPayloads'] ) | |
| 356 | + ? (array) $menu_payload['scriptDepPayloads'] | |
| 357 | + : array(); | |
| 350 | 358 | $user_file_associations = function_exists( 'openstation_get_user_file_associations' ) |
| 351 | 359 | ? openstation_get_user_file_associations( get_current_user_id() ) |
| 352 | 360 | : array(); |
| 353 | 361 | $server_wallpaper_menu_items = function_exists( 'openstation_build_wallpaper_menu_items' ) |
| @@ -561,8 +569,11 @@ | ||
| 561 | 569 | 'serverDesktopThemes' => $server_desktop_themes, |
| 562 | 570 | 'desktopIcons' => $desktop_icons, |
| 563 | 571 | 'serverFileTypes' => $server_file_types, |
| 564 | 572 | 'serverFileOpeners' => $server_file_openers, |
| 573 | + // Handle => dependency payload for every `scriptDeps` list in | |
| 574 | + // this config; see `openstation_compact_script_deps()`. | |
| 575 | + 'scriptDepPayloads' => (object) $script_dep_payloads, | |
| 565 | 576 | 'userFileAssociations' => $user_file_associations, |
| 566 | 577 | 'filesUrl' => esc_url_raw( rest_url( 'desktop-mode/v1/files' ) ), |
| 567 | 578 | // Pinned-notes REST base (`includes/notes/rest.php`). The |
| 568 | 579 | // notes layer boots only when this is present. |