mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-24 17:28:40 +00:00
auto-update: Link to the current release's changelog, not the latest one (#3076)
An user complained in zed-industries/community#2093 that we always link to the latest release changelog, not the one that they've just updated to. Release Notes: - Fixed changelog link in update notification always leading to the latest release changelog, not the one that was updated to. Fixes zed-industries/community#2093.
This commit is contained in:
parent
95e09dd2e9
commit
a785eb9141
1 changed files with 5 additions and 3 deletions
|
@ -115,13 +115,15 @@ pub fn check(_: &Check, cx: &mut AppContext) {
|
|||
|
||||
fn view_release_notes(_: &ViewReleaseNotes, cx: &mut AppContext) {
|
||||
if let Some(auto_updater) = AutoUpdater::get(cx) {
|
||||
let server_url = &auto_updater.read(cx).server_url;
|
||||
let auto_updater = auto_updater.read(cx);
|
||||
let server_url = &auto_updater.server_url;
|
||||
let current_version = auto_updater.current_version;
|
||||
let latest_release_url = if cx.has_global::<ReleaseChannel>()
|
||||
&& *cx.global::<ReleaseChannel>() == ReleaseChannel::Preview
|
||||
{
|
||||
format!("{server_url}/releases/preview/latest")
|
||||
format!("{server_url}/releases/preview/{current_version}")
|
||||
} else {
|
||||
format!("{server_url}/releases/stable/latest")
|
||||
format!("{server_url}/releases/stable/{current_version}")
|
||||
};
|
||||
cx.platform().open_url(&latest_release_url);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue