| 120 | } |
| 121 | |
| 122 | void App::normalLaunch() |
| 123 | { |
| 124 | auto const destination = Command::Get().GetDestination(); |
| 125 | if (destination.empty()) |
| 126 | return; |
| 127 | |
| 128 | auto const recordFile = Command::Get().RecordFile(); |
| 129 | auto viewModel = ViewModelLocator::GetInstance().RobocopyViewModel(); |
| 130 | |
| 131 | #ifndef _DEBUG |
| 132 | if (recordFile.empty()) |
| 133 | return; |
| 134 | #endif // !_DEBUG |
| 135 | |
| 136 | |
| 137 | viewModel.Destination(destination); |
| 138 | viewModel.RecordFile(recordFile); |
| 139 | viewModel.Finished([recordFile](auto, FinishState state) { |
| 140 | #ifndef _DEBUG |
| 141 | if (state == FinishState::Success) |
| 142 | std::filesystem::remove(recordFile.data()); |
| 143 | #endif |
| 144 | }); |
| 145 | |
| 146 | LOGI(L"App started, record file: {}", recordFile.data()); |
| 147 | |
| 148 | window = make<CopyDialogWindow>(); |
| 149 | window.Activate(); |
| 150 | Global::windowEffectHelper.SetTarget(window); |
| 151 | Global::windowEffectHelper.SetListenThemeChange(); |
| 152 | viewModel.Start(); |
| 153 | } |
nothing calls this directly
no test coverage detected