diff options
Diffstat (limited to 'src/app.c')
-rw-r--r-- | src/app.c | 35 |
1 files changed, 22 insertions, 13 deletions
@@ -2827,19 +2827,28 @@ iBool handleCommand_App(const char *cmd) { | |||
2827 | refresh_Feeds(); | 2827 | refresh_Feeds(); |
2828 | return iTrue; | 2828 | return iTrue; |
2829 | } | 2829 | } |
2830 | else if (equal_Command(cmd, "feeds.update.started")) { | 2830 | else if (startsWith_CStr(cmd, "feeds.update.")) { |
2831 | iAnyObject *prog = findWidget_Root("feeds.progress"); | 2831 | const iWidget *navBar = findChild_Widget(get_Window()->roots[0]->widget, "navbar"); |
2832 | const iWidget *navBar = findWidget_Root("navbar"); | 2832 | iAnyObject *prog = findChild_Widget(navBar, "feeds.progress"); |
2833 | updateTextAndResizeWidthCStr_LabelWidget( | 2833 | if (equal_Command(cmd, "feeds.update.started") || |
2834 | prog, flags_Widget(navBar) & tight_WidgetFlag || deviceType_App() == phone_AppDeviceType ? | 2834 | equal_Command(cmd, "feeds.update.progress")) { |
2835 | "\u2605" : "\u2605 ${status.feeds}"); | 2835 | const int num = arg_Command(cmd); |
2836 | showCollapsed_Widget(prog, iTrue); | 2836 | const int total = argLabel_Command(cmd, "total"); |
2837 | return iFalse; | 2837 | updateTextAndResizeWidthCStr_LabelWidget(prog, |
2838 | } | 2838 | flags_Widget(navBar) & tight_WidgetFlag || |
2839 | else if (equal_Command(cmd, "feeds.update.finished")) { | 2839 | deviceType_App() == phone_AppDeviceType |
2840 | showCollapsed_Widget(findWidget_Root("feeds.progress"), iFalse); | 2840 | ? star_Icon |
2841 | refreshFinished_Feeds(); | 2841 | : star_Icon " ${status.feeds}"); |
2842 | refresh_Widget(findWidget_App("url")); | 2842 | showCollapsed_Widget(prog, iTrue); |
2843 | setFixedSize_Widget(findChild_Widget(prog, "feeds.progressbar"), | ||
2844 | init_I2(width_Widget(prog) * num / total, -1)); | ||
2845 | } | ||
2846 | else if (equal_Command(cmd, "feeds.update.finished")) { | ||
2847 | showCollapsed_Widget(prog, iFalse); | ||
2848 | refreshFinished_Feeds(); | ||
2849 | refresh_Widget(findWidget_App("url")); | ||
2850 | return iFalse; | ||
2851 | } | ||
2843 | return iFalse; | 2852 | return iFalse; |
2844 | } | 2853 | } |
2845 | else if (equal_Command(cmd, "visited.changed")) { | 2854 | else if (equal_Command(cmd, "visited.changed")) { |