chore: remove cargo-packager-updater (it sucks)

This commit is contained in:
2025-02-16 20:32:23 +07:00
parent ae01a2d67a
commit 31e94c53c6
3 changed files with 3 additions and 171 deletions

View File

@@ -29,6 +29,5 @@ rust-embed.workspace = true
smol.workspace = true
rustls = "0.23.23"
cargo-packager-updater = "0.2.2"
tracing-subscriber = { version = "0.3.18", features = ["fmt"] }
log = "0.4"

View File

@@ -1,14 +1,9 @@
use cargo_packager_updater::{check_update, semver::Version, url::Url};
use common::{
constants::{UPDATER_PUBKEY, UPDATER_URL},
profile::NostrProfile,
};
use common::profile::NostrProfile;
use gpui::{
actions, div, img, impl_internal_actions, prelude::FluentBuilder, px, App, AppContext, Axis,
Context, Entity, InteractiveElement, IntoElement, ObjectFit, ParentElement, Render, Styled,
StyledImage, Window,
};
use log::info;
use nostr_sdk::prelude::*;
use serde::Deserialize;
use state::get_client;
@@ -88,26 +83,6 @@ impl AppView {
view.set_center(center_panel, window, cx);
});
// Check and auto update to the latest version
cx.background_spawn(async move {
// Set auto updater config
let config = cargo_packager_updater::Config {
endpoints: vec![Url::parse(UPDATER_URL).expect("Failed to parse UPDATER URL")],
pubkey: String::from(UPDATER_PUBKEY),
..Default::default()
};
// Run auto updater
if let Ok(current_version) = Version::parse(env!("CARGO_PKG_VERSION")) {
if let Ok(Some(update)) = check_update(current_version, config) {
if update.download_and_install().is_ok() {
info!("Update installed")
}
}
}
})
.detach();
cx.new(|cx| {
let public_key = account.public_key();
let relays = cx.new(|_| None);