mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-26 22:43:43 +10:00
refactor: Improvements to src-tauri
Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
@@ -18,6 +18,12 @@ pub struct FetchGameStruct {
|
||||
version: Option<GameVersion>,
|
||||
}
|
||||
|
||||
impl FetchGameStruct {
|
||||
pub fn new(game: Game, status: GameStatusWithTransient, version: Option<GameVersion>) -> Self {
|
||||
Self { game, status, version }
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Debug, Default, Encode, Decode)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Game {
|
||||
@@ -33,6 +39,11 @@ pub struct Game {
|
||||
m_image_library_object_ids: Vec<String>,
|
||||
m_image_carousel_object_ids: Vec<String>,
|
||||
}
|
||||
impl Game {
|
||||
pub fn id(&self) -> &String {
|
||||
&self.id
|
||||
}
|
||||
}
|
||||
#[derive(serde::Serialize, Clone)]
|
||||
pub struct GameUpdateEvent {
|
||||
pub game_id: String,
|
||||
|
||||
Reference in New Issue
Block a user