refactor: 移除遥测并修复启动器流程
This commit is contained in:
@ -509,10 +509,6 @@ fn main() {
|
||||
.commands(&[
|
||||
"settings_get",
|
||||
"settings_set",
|
||||
"privacy_get",
|
||||
"privacy_set",
|
||||
"telemetry_set",
|
||||
"discord_rpc_set",
|
||||
"download_engine_set",
|
||||
"cancel_directory_change",
|
||||
"proxy_get",
|
||||
|
||||
@ -6,7 +6,6 @@ use path_util::SafeRelativeUtf8UnixPathBuf;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::HashMap;
|
||||
use std::path::{Path, PathBuf};
|
||||
use theseus::DownloadReason;
|
||||
use theseus::data::{
|
||||
AppliedContentSetPatch, ContentItem, Dependency,
|
||||
EditInstance as CoreEditInstance, InstanceInstallCandidate,
|
||||
@ -1116,16 +1115,11 @@ pub async fn instance_update_project(
|
||||
pub async fn instance_add_project_from_version(
|
||||
instance_id: &str,
|
||||
version_id: &str,
|
||||
reason: DownloadReason,
|
||||
dependent_on_version_id: Option<String>,
|
||||
) -> Result<String> {
|
||||
Ok(theseus::instance::add_project_from_version(
|
||||
instance_id,
|
||||
version_id,
|
||||
reason,
|
||||
dependent_on_version_id,
|
||||
Ok(
|
||||
theseus::instance::add_project_from_version(instance_id, version_id)
|
||||
.await?,
|
||||
)
|
||||
.await?)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
|
||||
@ -25,7 +25,6 @@ pub mod shortcuts;
|
||||
pub mod storage;
|
||||
pub mod system_accent;
|
||||
pub mod tags;
|
||||
pub mod telemetry;
|
||||
pub mod terracotta;
|
||||
pub mod translation;
|
||||
pub mod utils;
|
||||
|
||||
@ -8,10 +8,6 @@ pub fn init<R: tauri::Runtime>() -> tauri::plugin::TauriPlugin<R> {
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
settings_get,
|
||||
settings_set,
|
||||
privacy_get,
|
||||
privacy_set,
|
||||
telemetry_set,
|
||||
discord_rpc_set,
|
||||
download_engine_set,
|
||||
cancel_directory_change,
|
||||
proxy_get,
|
||||
@ -41,26 +37,6 @@ pub async fn settings_set(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn privacy_get() -> Result<PrivacySettings> {
|
||||
Ok(settings::get_privacy().await?)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn privacy_set(privacy: PrivacySettings) -> Result<PrivacySettings> {
|
||||
Ok(settings::set_privacy(privacy).await?)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn telemetry_set(enabled: bool) -> Result<PrivacySettings> {
|
||||
Ok(settings::set_telemetry(enabled).await?)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn discord_rpc_set(enabled: bool) -> Result<PrivacySettings> {
|
||||
Ok(settings::set_discord_rpc(enabled).await?)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn download_engine_set(
|
||||
engine: settings::DownloadEngine,
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
pub fn init<R: tauri::Runtime>() -> tauri::plugin::TauriPlugin<R> {
|
||||
tauri::plugin::Builder::new("telemetry")
|
||||
.invoke_handler(tauri::generate_handler![notify_online,])
|
||||
.build()
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn notify_online() {
|
||||
theseus::telemetry::notify_online();
|
||||
}
|
||||
@ -389,16 +389,6 @@ async fn backup_app_db_for_update(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn set_discord_activity(activity: String) -> api::Result<()> {
|
||||
let state = State::get().await?;
|
||||
state
|
||||
.discord_rpc
|
||||
.set_launcher_activity(&activity, true)
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// Should be call once Vue has mounted the app
|
||||
#[tracing::instrument(skip_all)]
|
||||
#[tauri::command]
|
||||
@ -823,7 +813,6 @@ fn main() {
|
||||
.plugin(api::schematic_preview::init())
|
||||
.plugin(api::shortcuts::init())
|
||||
.plugin(api::tags::init())
|
||||
.plugin(api::telemetry::init())
|
||||
.plugin(api::translation::init())
|
||||
.plugin(api::utils::init())
|
||||
.plugin(api::cache::init())
|
||||
@ -851,7 +840,6 @@ fn main() {
|
||||
copy_database_between_channels,
|
||||
beta_database_exists,
|
||||
backup_app_db_for_update,
|
||||
set_discord_activity,
|
||||
is_dev,
|
||||
portable::is_portable_mode,
|
||||
are_updates_enabled,
|
||||
|
||||
Reference in New Issue
Block a user