--- a/application/application.c Tue Jan 30 16:58:03 2024 +0100 +++ b/application/application.c Wed Jan 31 12:55:11 2024 +0100 @@ -80,10 +80,10 @@ // toolbar ui_toolbar_item("Home", .icon = "Home"); ui_toolbar_item("NewWindow", .icon = "NewWindow", .onclick = action_window_new); + ui_toolbar_item("Refresh", .icon = "Refresh", .onclick = action_refresh); ui_toolbar_menu("Repo", .label = "Repository") { ui_menu_itemlist(.varname = "repolist", .getvalue = davrepo_getname, .onselect = action_repo_selected); } - ui_toolbar_item("Refresh", .icon = "Refresh"); ui_toolbar_item("NewFolder", .icon = "NewFolder"); ui_toolbar_item("NewFile", .icon = "Add"); ui_toolbar_item("Upload", .label = "Upload", .icon = "Upload"); @@ -99,6 +99,7 @@ ui_toolbar_add_default("Home", UI_TOOLBAR_LEFT); ui_toolbar_add_default("NewWindow", UI_TOOLBAR_LEFT); + ui_toolbar_add_default("Refresh", UI_TOOLBAR_LEFT); ui_toolbar_add_default("Repo", UI_TOOLBAR_LEFT); ui_toolbar_add_default("NewFolder", UI_TOOLBAR_CENTER); @@ -150,6 +151,13 @@ ui_show(win); } +void action_refresh(UiEvent *event, void *data) { + DavBrowser *browser = event->document; + if (browser->current) { + davbrowser_query_path(event->obj, browser, browser->current->path); + } +} + void action_repo_selected(UiEvent *event, void *data) { DavCfgRepository *repo = event->eventdata; DavBrowser *browser = event->document;