fix(app-lib): actually delete custom skins with no cape overrides
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
{
|
||||
"name": "display_claims!: serde_json::Value",
|
||||
"ordinal": 7,
|
||||
"type_info": "Text"
|
||||
"type_info": "Null"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -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?)
|
||||
|
||||
Reference in New Issue
Block a user