fix(app-lib): actually delete custom skins with no cape overrides

This commit is contained in:
Alejandro González
2025-06-14 20:36:55 +02:00
parent 4ba5498c6c
commit 864c20c3dc
4 changed files with 5 additions and 5 deletions

View File

@@ -41,7 +41,7 @@
{
"name": "display_claims!: serde_json::Value",
"ordinal": 7,
"type_info": "Text"
"type_info": "Null"
}
],
"parameters": {

View File

@@ -1,6 +1,6 @@
{
"db_name": "SQLite",
"query": "DELETE FROM custom_minecraft_skins WHERE minecraft_user_uuid = ? AND texture_key = ? AND variant = ? AND cape_id = ?",
"query": "DELETE FROM custom_minecraft_skins WHERE minecraft_user_uuid = ? AND texture_key = ? AND variant = ? AND cape_id IS ?",
"describe": {
"columns": [],
"parameters": {
@@ -8,5 +8,5 @@
},
"nullable": []
},
"hash": "1937e191a7815a55274bb39a035e02a39bb04b45dbd727e5db5b5308deda4e04"
"hash": "faa8437519571b147b0135054847674be5035f385e0d85e759d4bbf9bca54f20"
}

View File

@@ -244,7 +244,7 @@ pub async fn get_available_skins() -> crate::Result<Vec<Skin>> {
/// Minecraft profile. If the currently equipped skin is custom but not managed by
/// the app (i.e., it was set externally by another launcher, the Minecraft website,
/// etc.), that skin will be added as a custom skin to the app database as well.
#[tracing::instrument]
#[tracing::instrument(skip(texture_blob))]
pub async fn add_and_equip_custom_skin(
texture_blob: Bytes,
variant: MinecraftSkinVariant,

View File

@@ -169,7 +169,7 @@ impl CustomMinecraftSkin {
sqlx::query!(
"DELETE FROM custom_minecraft_skins \
WHERE minecraft_user_uuid = ? AND texture_key = ? AND variant = ? AND cape_id = ?",
WHERE minecraft_user_uuid = ? AND texture_key = ? AND variant = ? AND cape_id IS ?",
minecraft_user_id, self.texture_key, self.variant, cape_id
)
.execute(&mut *db.acquire().await?)