remove leftover updater structs

This commit is contained in:
amrbashir
2023-05-10 04:05:52 +03:00
parent 4f232fd8c8
commit f935455cd8
3 changed files with 1 additions and 45 deletions

View File

@@ -46,7 +46,6 @@ fn alias(alias: &str, has_feature: bool) {
fn main() {
alias("custom_protocol", has_feature("custom-protocol"));
alias("dev", !has_feature("custom-protocol"));
alias("updater", has_feature("updater"));
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
let mobile = target_os == "ios" || target_os == "android";

View File

@@ -174,10 +174,6 @@ pub enum RunEvent {
///
/// This event is useful as a place to put your code that should be run after all state-changing events have been handled and you want to do stuff (updating state, performing calculations, etc) that happens as the “main body” of your event loop.
MainEventsCleared,
/// Updater event.
#[cfg(updater)]
#[cfg_attr(doc_cfg, doc(cfg(feature = "updater")))]
Updater(crate::UpdaterEvent),
}
impl From<EventLoopMessage> for RunEvent {

View File

@@ -269,48 +269,9 @@ pub fn log_stdout() {
});
}
/// Updater events.
#[cfg(updater)]
#[cfg_attr(doc_cfg, doc(cfg(feature = "updater")))]
#[derive(Debug, Clone)]
pub enum UpdaterEvent {
/// An update is available.
UpdateAvailable {
/// The update body.
body: String,
/// The update release date.
date: Option<time::OffsetDateTime>,
/// The update version.
version: String,
},
/// The update is pending and about to be downloaded.
Pending,
/// The update download received a progress event.
DownloadProgress {
/// The amount that was downloaded on this iteration.
/// Does not accumulate with previous chunks.
chunk_length: usize,
/// The total
content_length: Option<u64>,
},
/// The update has been downloaded and is now about to be installed.
Downloaded,
/// The update has been applied and the app is now up to date.
Updated,
/// The app is already up to date.
AlreadyUpToDate,
/// An error occurred while updating.
Error(String),
}
/// The user event type.
#[derive(Debug, Clone)]
pub enum EventLoopMessage {
/// Updater event.
#[cfg(updater)]
#[cfg_attr(doc_cfg, doc(cfg(feature = "updater")))]
Updater(UpdaterEvent),
}
pub enum EventLoopMessage {}
/// The webview runtime interface. A wrapper around [`runtime::Runtime`] with the proper user event type associated.
pub trait Runtime: runtime::Runtime<EventLoopMessage> {}