mirror of
https://github.com/yattee/yattee.git
synced 2024-12-14 14:20:32 +05:30
Fix #81
This commit is contained in:
parent
9d8a2607ab
commit
aa42551c7c
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user