diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-11-24 08:29:32 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-11-24 08:29:32 +0200 |
commit | 11cb01d77815ae08499041f586348536b065dc5d (patch) | |
tree | e0ec5bfcb73679bdb02f1828eb8e489b636a7508 /src/app.c | |
parent | 83b560ddd19703d52c6a2cfe9ad6da7f9f0c9eb8 (diff) |
SidebarWidget: Save feeds mode (all/unread)
Diffstat (limited to 'src/app.c')
-rw-r--r-- | src/app.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -491,7 +491,13 @@ static iBool loadState_App_(iApp *d) { | |||
491 | setClosedFolders_SidebarWidget(sidebar, closedFolders[0]); | 491 | setClosedFolders_SidebarWidget(sidebar, closedFolders[0]); |
492 | setClosedFolders_SidebarWidget(sidebar2, closedFolders[1]); | 492 | setClosedFolders_SidebarWidget(sidebar2, closedFolders[1]); |
493 | postCommandf_Root(root, "sidebar.mode arg:%u", modes & 0xf); | 493 | postCommandf_Root(root, "sidebar.mode arg:%u", modes & 0xf); |
494 | postCommandf_Root(root, "sidebar2.mode arg:%u", modes >> 4); | 494 | postCommandf_Root(root, "sidebar2.mode arg:%u", (modes >> 4) & 0xf); |
495 | if (flags & 4) { | ||
496 | postCommand_Widget(sidebar, "feeds.mode arg:%d", unread_FeedsMode); | ||
497 | } | ||
498 | if (flags & 8) { | ||
499 | postCommand_Widget(sidebar2, "feeds.mode arg:%d", unread_FeedsMode); | ||
500 | } | ||
495 | if (deviceType_App() != phone_AppDeviceType) { | 501 | if (deviceType_App() != phone_AppDeviceType) { |
496 | setWidth_SidebarWidget(sidebar, widths[0]); | 502 | setWidth_SidebarWidget(sidebar, widths[0]); |
497 | setWidth_SidebarWidget(sidebar2, widths[1]); | 503 | setWidth_SidebarWidget(sidebar2, widths[1]); |
@@ -566,7 +572,9 @@ static void saveState_App_(const iApp *d) { | |||
566 | const iSidebarWidget *sidebar2 = findChild_Widget(root->widget, "sidebar2"); | 572 | const iSidebarWidget *sidebar2 = findChild_Widget(root->widget, "sidebar2"); |
567 | writeU16_File(f, i | | 573 | writeU16_File(f, i | |
568 | (isVisible_Widget(sidebar) ? 0x100 : 0) | | 574 | (isVisible_Widget(sidebar) ? 0x100 : 0) | |
569 | (isVisible_Widget(sidebar2) ? 0x200 : 0)); | 575 | (isVisible_Widget(sidebar2) ? 0x200 : 0) | |
576 | (feedsMode_SidebarWidget(sidebar) == unread_FeedsMode ? 0x400 : 0) | | ||
577 | (feedsMode_SidebarWidget(sidebar2) == unread_FeedsMode ? 0x800 : 0)); | ||
570 | writeU8_File(f, | 578 | writeU8_File(f, |
571 | mode_SidebarWidget(sidebar) | | 579 | mode_SidebarWidget(sidebar) | |
572 | (mode_SidebarWidget(sidebar2) << 4)); | 580 | (mode_SidebarWidget(sidebar2) << 4)); |