diff options
Diffstat (limited to 'src/app.c')
-rw-r--r-- | src/app.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -425,12 +425,22 @@ static iBool loadState_App_(iApp *d) { | |||
425 | readf_Stream(stream_File(f)), | 425 | readf_Stream(stream_File(f)), |
426 | readf_Stream(stream_File(f)) | 426 | readf_Stream(stream_File(f)) |
427 | }; | 427 | }; |
428 | iIntSet *closedFolders[2] = { | ||
429 | collectNew_IntSet(), | ||
430 | collectNew_IntSet() | ||
431 | }; | ||
432 | if (version >= bookmarkFolderState_FileVersion) { | ||
433 | deserialize_IntSet(closedFolders[0], stream_File(f)); | ||
434 | deserialize_IntSet(closedFolders[1], stream_File(f)); | ||
435 | } | ||
428 | const uint8_t rootIndex = bits & 0xff; | 436 | const uint8_t rootIndex = bits & 0xff; |
429 | const uint8_t flags = bits >> 8; | 437 | const uint8_t flags = bits >> 8; |
430 | iRoot *root = d->window->base.roots[rootIndex]; | 438 | iRoot *root = d->window->base.roots[rootIndex]; |
431 | if (root) { | 439 | if (root) { |
432 | iSidebarWidget *sidebar = findChild_Widget(root->widget, "sidebar"); | 440 | iSidebarWidget *sidebar = findChild_Widget(root->widget, "sidebar"); |
433 | iSidebarWidget *sidebar2 = findChild_Widget(root->widget, "sidebar2"); | 441 | iSidebarWidget *sidebar2 = findChild_Widget(root->widget, "sidebar2"); |
442 | setClosedFolders_SidebarWidget(sidebar, closedFolders[0]); | ||
443 | setClosedFolders_SidebarWidget(sidebar2, closedFolders[1]); | ||
434 | postCommandf_Root(root, "sidebar.mode arg:%u", modes & 0xf); | 444 | postCommandf_Root(root, "sidebar.mode arg:%u", modes & 0xf); |
435 | postCommandf_Root(root, "sidebar2.mode arg:%u", modes >> 4); | 445 | postCommandf_Root(root, "sidebar2.mode arg:%u", modes >> 4); |
436 | if (deviceType_App() != phone_AppDeviceType) { | 446 | if (deviceType_App() != phone_AppDeviceType) { |
@@ -513,6 +523,8 @@ static void saveState_App_(const iApp *d) { | |||
513 | (mode_SidebarWidget(sidebar2) << 4)); | 523 | (mode_SidebarWidget(sidebar2) << 4)); |
514 | writef_Stream(stream_File(f), width_SidebarWidget(sidebar)); | 524 | writef_Stream(stream_File(f), width_SidebarWidget(sidebar)); |
515 | writef_Stream(stream_File(f), width_SidebarWidget(sidebar2)); | 525 | writef_Stream(stream_File(f), width_SidebarWidget(sidebar2)); |
526 | serialize_IntSet(closedFolders_SidebarWidget(sidebar), stream_File(f)); | ||
527 | serialize_IntSet(closedFolders_SidebarWidget(sidebar2), stream_File(f)); | ||
516 | } | 528 | } |
517 | } | 529 | } |
518 | } | 530 | } |