From e2cb7a70a86dbc2a5daed198b87e7f76a2169fcb Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Mon, 27 Jun 2022 15:41:09 -0700 Subject: [PATCH] rename showCreateLabelModal from showCreateEmailModal --- .../Sources/App/Views/Labels/ApplyLabelsView.swift | 4 ++-- apple/OmnivoreKit/Sources/App/Views/Labels/LabelsView.swift | 6 +++--- .../Sources/App/Views/Labels/LabelsViewModel.swift | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apple/OmnivoreKit/Sources/App/Views/Labels/ApplyLabelsView.swift b/apple/OmnivoreKit/Sources/App/Views/Labels/ApplyLabelsView.swift index c9bc20261..3135c7892 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Labels/ApplyLabelsView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Labels/ApplyLabelsView.swift @@ -42,7 +42,7 @@ struct ApplyLabelsView: View { List { Section { Button( - action: { viewModel.showCreateEmailModal = true }, + action: { viewModel.showCreateLabelModal = true }, label: { HStack { Image(systemName: "plus.circle.fill").foregroundColor(.green) @@ -102,7 +102,7 @@ struct ApplyLabelsView: View { } } #endif - .sheet(isPresented: $viewModel.showCreateEmailModal) { + .sheet(isPresented: $viewModel.showCreateLabelModal) { CreateLabelView(viewModel: viewModel) } } diff --git a/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsView.swift b/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsView.swift index d26a4dc98..803eb5c4b 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsView.swift @@ -46,7 +46,7 @@ struct LabelsView: View { Group { Section(footer: Text(footerText)) { Button( - action: { viewModel.showCreateEmailModal = true }, + action: { viewModel.showCreateLabelModal = true }, label: { HStack { Image(systemName: "plus.circle.fill").foregroundColor(.green) @@ -77,7 +77,7 @@ struct LabelsView: View { } } .navigationTitle("Labels") - .sheet(isPresented: $viewModel.showCreateEmailModal) { + .sheet(isPresented: $viewModel.showCreateLabelModal) { CreateLabelView(viewModel: viewModel) } } @@ -168,7 +168,7 @@ struct CreateLabelView: View { var cancelCreateLabelButton: some View { Button( - action: { viewModel.showCreateEmailModal = false }, + action: { viewModel.showCreateLabelModal = false }, label: { Text("Cancel").foregroundColor(.appGrayTextContrast) } ) } diff --git a/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsViewModel.swift b/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsViewModel.swift index 06b8ceefb..6c251e2b6 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsViewModel.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsViewModel.swift @@ -8,7 +8,7 @@ import Views @Published var selectedLabels = [LinkedItemLabel]() @Published var unselectedLabels = [LinkedItemLabel]() @Published var labels = [LinkedItemLabel]() - @Published var showCreateEmailModal = false + @Published var showCreateLabelModal = false @Published var labelSearchFilter = "" func loadLabels( @@ -53,7 +53,7 @@ import Views } isLoading = false - showCreateEmailModal = false + showCreateLabelModal = false } func deleteLabel(dataService: DataService, labelID: String, name: String) {