mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Use animation on remove swipe action
This commit is contained in:
parent
9feb6bb0e5
commit
1e8ac68a38
1 changed files with 6 additions and 2 deletions
|
|
@ -884,7 +884,9 @@ struct AnimatingCellHeight: AnimatableModifier {
|
|||
case .delete:
|
||||
return AnyView(Button(
|
||||
action: {
|
||||
viewModel.removeLibraryItem(dataService: dataService, objectID: item.objectID)
|
||||
withAnimation(.linear(duration: 0.4)) {
|
||||
viewModel.removeLibraryItem(dataService: dataService, objectID: item.objectID)
|
||||
}
|
||||
},
|
||||
label: {
|
||||
Label("Remove", systemImage: "trash")
|
||||
|
|
@ -893,7 +895,9 @@ struct AnimatingCellHeight: AnimatableModifier {
|
|||
case .moveToInbox:
|
||||
return AnyView(Button(
|
||||
action: {
|
||||
viewModel.moveToFolder(dataService: dataService, item: item, folder: "inbox")
|
||||
withAnimation(.linear(duration: 0.4)) {
|
||||
viewModel.moveToFolder(dataService: dataService, item: item, folder: "inbox")
|
||||
}
|
||||
},
|
||||
label: {
|
||||
Label(title: { Text("Move to Library") },
|
||||
|
|
|
|||
Loading…
Reference in a new issue