title: Scene phase View updating
body: <p>In app I check scene phases by scenePhase variable</p>
  <pre><code>@main
      struct StorageApp: App {
          @Environment(\.scenePhase) var scenePhase
          var userManager: UserManagerProtocol = DIContainer.shared.userManager
          
          var body: some Scene {
              WindowGroup {
                  ViewsFactory.build(.content)
              }
              .onChange(of: scenePhase) { newScenePhase in
                  switch newScenePhase {
                  case .background:
                      userManager.appEnterBackground()
                  default:
                      return
                  }
              }
          }
      }
  </code></pre>
  <p>when my view is loaded I call fetch method to get data from API</p>
  <pre><code>struct AuthorizationView: View {
      @ObservedObject private var viewModel: AuthorizationViewModel
      @State private var selection: Int?
      private let createAccount: Int
      private let importAccount: Int
      private let signIn: Int
      
      var body: some View {
          NavigationView {
              VStack(spacing: MagicNumber.x) {
                  if viewModel.isLoading {
                      Spacer()
                      ProgressView()
                          .frame(idealWidth: .infinity, maxWidth: .infinity, alignment: .center)
                      Spacer()
                  } else if viewModel.wallets.isEmpty {
                      Spacer()
                      VStack(spacing: MagicNumber.x3) {
                          IconView(name: .addressPlaceholder)
                          Text(Localizable.emptyAccounts.localized)
                              .font(.appFont(size: 18))
                              .foregroundColor(.grayText)
                      }
                      Spacer()
                  } else {
                      ScrollView {
                          ForEach(viewModel.wallets.indices, id: \.self) { index in
                              if index &lt; viewModel.wallets.count, let wallet = viewModel.wallets[index] {
                                  Button {
                                      viewModel.select(wallet, in: index + 1)
                                      self.selection = signIn
                                  } label: {
                                      WalletCell(of: wallet, in: index + 1)
                                  }
                              }
                          }
                      }
                  }
                  Button(Localizable.createAccount.localized) {
                      self.selection = createAccount
                  }
                  .buttonStyle(PrimaryButton())
                  Button(Localizable.importAccount.localized) {
                      self.selection = importAccount
                  }
                  .buttonStyle(TextButton())
                  .padding(.bottom, MagicNumber.x2)
                  NavigationLink(destination: ViewsFactory.build(.createAccount), tag: createAccount, selection: $selection) {
                      EmptyView()
                  }
                  NavigationLink(destination: ViewsFactory.build(.importAccount), tag: importAccount, selection: $selection) {
                      EmptyView()
                  }
                  NavigationLink(destination: ViewsFactory.build(.signIn(viewModel.selectedWallet, deleteAction: {
                      viewModel.deleteWallet() })), tag: signIn, selection: $selection) {
                          EmptyView()
                      }
              }
              .padding(.horizontal, MagicNumber.x2 + MagicNumber.x05)
          }
          .onAppear {
              viewModel.fetchWalletsItems()
          }
      }
  }
  </code></pre>
  <p>My viewModel</p>
  <pre><code>import Combine
  import Foundation
  
  final class AuthorizationViewModel: ObservableObject {
      @Published var errorDescription: String
      @Published var isErrorAppears: Bool
      @Published var isLoading: Bool
      @Published var repository: StorageRepositoryProtocol
      @Published var wallets: [Wallet]
      var selectedWallet: Wallet
      private var cancellable: AnyCancellable?
      
      init(repository: StorageRepositoryProtocol) {
          errorDescription = &quot;&quot;
          isErrorAppears = false
          isLoading = false
          wallets = []
          selectedWallet = Wallet(address: &quot;&quot;, name: &quot;\(0)&quot;)
          self.repository = repository
      }
      
      func fetchWalletsItems() {
          if isLoading { return }
          isLoading = true
          cancellable = repository.getAccountsList()
              .receive(on: DispatchQueue.main)
              .sink { [weak self] completion in
                  guard let self = self else { return }
                  self.isLoading = false
                  switch completion {
                  case .failure(let error):
                      self.isErrorAppears = true
                      self.errorDescription = error.errorDescription
                  default:
                      break
                  }
              } receiveValue: { accounts in
                  self.isLoading = false
                  self.wallets = accounts.map({ Wallet(address: $0, name: String.randomString(length: 1))})
              }
      }
      
      func select(_ wallet: Wallet, in index: Int) {
          selectedWallet = wallet
          selectedWallet.name = &quot;\(Localizable.address.localized) \(index)&quot;
      }
      
      func deleteWallet() {
          wallets = wallets.filter { $0.address != selectedWallet.address }
      }
  }
  </code></pre>
  <p>but if I use scenePhase my viewModel is being recreated and no longer sends the request because the onAppear method is called once</p>
  <p>I can call the fetch method in the viewModel initializer, but then there will be two identical requests.</p>
  <p>How I can send once request when my view will no longer be updated?</p>