mirror of
https://github.com/modrinth/code.git
synced 2026-08-31 03:55:59 +00:00
remove: backend implementation
This commit is contained in:
@@ -142,9 +142,9 @@ export async function remove_custom_skin(skin: Skin): Promise<void> {
|
||||
})
|
||||
}
|
||||
|
||||
export async function reorder_custom_skins(skins: Skin[]): Promise<void> {
|
||||
await invoke('plugin:minecraft-skins|reorder_custom_skins', {
|
||||
skins,
|
||||
export async function set_custom_skin_order(textureKeys: string[]): Promise<void> {
|
||||
await invoke('plugin:minecraft-skins|set_custom_skin_order', {
|
||||
textureKeys,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ import {
|
||||
get_normalized_skin_texture,
|
||||
normalize_skin_texture,
|
||||
remove_custom_skin,
|
||||
reorder_custom_skins,
|
||||
set_custom_skin_order,
|
||||
} from '@/helpers/skins.ts'
|
||||
import { hasPride26Badge } from '@/helpers/user-campaigns.ts'
|
||||
import { handleSevereError } from '@/store/error'
|
||||
@@ -516,7 +516,7 @@ async function reorderSavedSkins(orderedSkins: Skin[]) {
|
||||
generateSkinPreviews(skins.value, capes.value)
|
||||
|
||||
try {
|
||||
await reorder_custom_skins(nextSavedSkins)
|
||||
await set_custom_skin_order(nextSavedSkins.map((skin) => skin.texture_key))
|
||||
} catch (error) {
|
||||
skins.value = previousSkins
|
||||
generateSkinPreviews(skins.value, capes.value)
|
||||
|
||||
Reference in New Issue
Block a user