Use animation on remove swipe action
This commit is contained in:
@ -884,7 +884,9 @@ struct AnimatingCellHeight: AnimatableModifier {
|
|||||||
case .delete:
|
case .delete:
|
||||||
return AnyView(Button(
|
return AnyView(Button(
|
||||||
action: {
|
action: {
|
||||||
viewModel.removeLibraryItem(dataService: dataService, objectID: item.objectID)
|
withAnimation(.linear(duration: 0.4)) {
|
||||||
|
viewModel.removeLibraryItem(dataService: dataService, objectID: item.objectID)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
Label("Remove", systemImage: "trash")
|
Label("Remove", systemImage: "trash")
|
||||||
@ -893,7 +895,9 @@ struct AnimatingCellHeight: AnimatableModifier {
|
|||||||
case .moveToInbox:
|
case .moveToInbox:
|
||||||
return AnyView(Button(
|
return AnyView(Button(
|
||||||
action: {
|
action: {
|
||||||
viewModel.moveToFolder(dataService: dataService, item: item, folder: "inbox")
|
withAnimation(.linear(duration: 0.4)) {
|
||||||
|
viewModel.moveToFolder(dataService: dataService, item: item, folder: "inbox")
|
||||||
|
}
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
Label(title: { Text("Move to Library") },
|
Label(title: { Text("Move to Library") },
|
||||||
|
|||||||
Reference in New Issue
Block a user