From b57046b1d9958d4a19a12c6de6de03c4eaf3faca Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Wed, 13 Apr 2022 10:19:55 -0700 Subject: [PATCH] add edit labels buttons to list view cells --- .../Sources/App/Views/Home/HomeFeedViewIOS.swift | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift index f6e31a5ed..799146733 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift @@ -195,6 +195,10 @@ import Views viewModel: viewModel ) .contextMenu { + Button( + action: { viewModel.itemUnderLabelEdit = item }, + label: { Label("Edit Labels", systemImage: "tag") } + ) Button(action: { withAnimation(.linear(duration: 0.4)) { viewModel.setLinkArchived(dataService: dataService, linkId: item.id, archived: !item.isArchived) @@ -223,7 +227,13 @@ import Views } if #available(iOS 15.0, *) { link - .swipeActions(edge: .trailing, allowsFullSwipe: true) { + .swipeActions(edge: .trailing, allowsFullSwipe: false) { + Button( + action: { viewModel.itemUnderLabelEdit = item }, + label: { Label("Edit Labels", systemImage: "tag") } + ) + } + .swipeActions(edge: .trailing, allowsFullSwipe: false) { if !item.isArchived { Button { withAnimation(.linear(duration: 0.4)) { @@ -242,7 +252,7 @@ import Views }.tint(.indigo) } } - .swipeActions(edge: .trailing, allowsFullSwipe: true) { + .swipeActions(edge: .trailing, allowsFullSwipe: false) { Button( role: .destructive, action: {