fix(updater): re-export shorebird_check_for_update for backward compat (#258)

This commit is contained in:
Felix Angelov
2024-12-19 15:51:07 -06:00
committed by GitHub
parent 38aadee1c5
commit 54e1e2ce2f
2 changed files with 15 additions and 0 deletions
+5
View File
@@ -150,6 +150,11 @@ SHOREBIRD_EXPORT void shorebird_free_string(const char *c_string);
SHOREBIRD_EXPORT void shorebird_free_update_result(struct UpdateResult *result);
/**
* Check for an update. Returns true if an update is available.
*/
SHOREBIRD_EXPORT bool shorebird_check_for_update(void);
/**
* Check for an update on the first non-null channel of:
* 1. `c_channel`
+10
View File
@@ -274,6 +274,16 @@ pub unsafe extern "C" fn shorebird_free_update_result(result: *mut UpdateResult)
}
}
/// Check for an update. Returns true if an update is available.
#[no_mangle]
pub extern "C" fn shorebird_check_for_update() -> bool {
log_on_error(
|| updater::check_for_downloadable_update(None),
"checking for update",
false,
)
}
/// Check for an update on the first non-null channel of:
/// 1. `c_channel`
/// 2. The channel specified in shorebird.yaml