fix(updates): give the update command a ui. id so the ribbon button is enabled

This commit is contained in:
Dylan M. Taylor
2026-10-25 14:37:40 -04:00
parent e3d93581b7
commit dd2e2c8605
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -1631,7 +1631,7 @@ impl WordApp {
fn ui_command(&mut self, id: &str, p: &Value) -> Option<Result<Value, String>> {
let s = |k: &str| p.get(k).and_then(Value::as_str);
Some(Ok(match id {
"app.checkForUpdates" | "help.checkForUpdates" => {
"ui.checkForUpdates" | "help.checkForUpdates" => {
crate::updates_ui::check(self);
Value::Null
}
@@ -3027,7 +3027,7 @@ pub(crate) fn works_without_document(id: &str) -> bool {
| "ui.discord"
| "ui.caretAnimation"
| "ui.startScreen"
| "app.checkForUpdates"
| "ui.checkForUpdates"
) || id.starts_with("help.")
}
+1 -1
View File
@@ -2431,7 +2431,7 @@ fn outlining(app: &mut WordApp, ui: &mut Ui) {
fn help(app: &mut WordApp, ui: &mut Ui) {
group(ui, "Help", None, app, |ui, app| {
big(ui, app, "help", "Help", "ui.dialog", json!({"name": "about"}), false);
big(ui, app, "checkForUpdates", "Check for\nUpdates…", "app.checkForUpdates", json!({}), false);
big(ui, app, "checkForUpdates", "Check for\nUpdates…", "ui.checkForUpdates", json!({}), false);
big(ui, app, "discord", "Community\nDiscord", "ui.discord", json!({}), false);
});
group(ui, "Agents", None, app, |ui, app| {