You've already forked AstralRinth
forked from didirus/AstralRinth
fixes (#449)
* fixes * prettier * more bugs * changes * more fixes * prettier, fmt, clippy * fix regressed error * println, console.log * fix imports --------- Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com> Co-authored-by: Jai A <jaiagr+gpg@pm.me>
This commit is contained in:
@@ -4,10 +4,10 @@ use crate::{
|
||||
CommandPayload, EventError, LoadingBar, LoadingBarType,
|
||||
ProcessPayloadType, ProfilePayloadType,
|
||||
},
|
||||
prelude::ProfilePathId,
|
||||
state::{ProcessType, SafeProcesses},
|
||||
};
|
||||
use futures::prelude::*;
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[cfg(feature = "tauri")]
|
||||
use crate::event::{
|
||||
@@ -298,12 +298,13 @@ pub async fn emit_process(
|
||||
#[allow(unused_variables)]
|
||||
pub async fn emit_profile(
|
||||
uuid: Uuid,
|
||||
path: PathBuf,
|
||||
profile_path_id: &ProfilePathId,
|
||||
name: &str,
|
||||
event: ProfilePayloadType,
|
||||
) -> crate::Result<()> {
|
||||
#[cfg(feature = "tauri")]
|
||||
{
|
||||
let path = profile_path_id.get_full_path().await?;
|
||||
let event_state = crate::EventState::get().await?;
|
||||
event_state
|
||||
.app
|
||||
@@ -311,6 +312,7 @@ pub async fn emit_profile(
|
||||
"profile",
|
||||
ProfilePayload {
|
||||
uuid,
|
||||
profile_path_id: profile_path_id.clone(),
|
||||
path,
|
||||
name: name.to_string(),
|
||||
event,
|
||||
|
||||
@@ -5,6 +5,7 @@ use tokio::sync::OnceCell;
|
||||
use tokio::sync::RwLock;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::prelude::ProfilePathId;
|
||||
use crate::state::SafeProcesses;
|
||||
|
||||
pub mod emit;
|
||||
@@ -240,6 +241,7 @@ pub enum ProcessPayloadType {
|
||||
#[derive(Serialize, Clone)]
|
||||
pub struct ProfilePayload {
|
||||
pub uuid: Uuid,
|
||||
pub profile_path_id: ProfilePathId,
|
||||
pub path: PathBuf,
|
||||
pub name: String,
|
||||
pub event: ProfilePayloadType,
|
||||
|
||||
Reference in New Issue
Block a user