1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-14 14:20:32 +05:30
This commit is contained in:
Arkadiusz Fal 2022-03-26 13:50:01 +01:00
parent 9d8a2607ab
commit aa42551c7c

View File

@ -11,10 +11,18 @@ struct DropFavorite: DropDelegate {
return
}
let from = favorites.firstIndex(of: current!)!
let to = favorites.firstIndex(of: item)!
guard let current = current else {
return
}
guard favorites[to].id != current!.id else {
let from = favorites.firstIndex(of: current)
let to = favorites.firstIndex(of: item)
guard let from = from, let to = to else {
return
}
guard favorites[to].id != current.id else {
return
}