From 7785b2dbf92fea120d2dfe0cecd65fa64dfbea57 Mon Sep 17 00:00:00 2001 From: Federico Maccaroni Date: Tue, 13 Dec 2022 16:36:45 -0300 Subject: [PATCH] EC-841 Fix Watch fetch cipher and added condition for previews (#2236) --- .../bitwarden WatchKit Extension/Views/CipherListView.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/watchOS/bitwarden/bitwarden WatchKit Extension/Views/CipherListView.swift b/src/watchOS/bitwarden/bitwarden WatchKit Extension/Views/CipherListView.swift index df46de75e..8830c78b0 100644 --- a/src/watchOS/bitwarden/bitwarden WatchKit Extension/Views/CipherListView.swift +++ b/src/watchOS/bitwarden/bitwarden WatchKit Extension/Views/CipherListView.swift @@ -86,7 +86,11 @@ struct CipherListView: View { .navigationTitle("Bitwarden") .navigationBarTitleDisplayMode(.inline) .onAppear { +#if targetEnvironment(simulator) // for the preview self.viewModel.fetchCiphers() +#else + self.viewModel.checkStateAndFetch() +#endif } .fullScreenCover(isPresented: $viewModel.showingSheet) { BWStateView(viewModel.currentState)