| 799 | } |
| 800 | |
| 801 | void Storage::RestoreDownloadQueue() |
| 802 | { |
| 803 | string download; |
| 804 | settings::TryGet(kDownloadQueueKey, download); |
| 805 | if (download.empty()) |
| 806 | return; |
| 807 | |
| 808 | strings::Tokenize(download, ";", [this](string_view v) |
| 809 | { |
| 810 | auto const it = base::FindIf( |
| 811 | m_notAppliedDiffs, [this, v](LocalCountryFile const & localDiff) { return v == FindCountryId(localDiff); }); |
| 812 | |
| 813 | if (it == m_notAppliedDiffs.end()) |
| 814 | { |
| 815 | string const s(v); |
| 816 | auto localFile = GetLatestLocalFile(s); |
| 817 | auto isUpdate = localFile && localFile->OnDisk(MapFileType::Map); |
| 818 | DownloadNode(s, isUpdate); |
| 819 | } |
| 820 | }); |
| 821 | } |
| 822 | |
| 823 | void Storage::DownloadCountry(CountryId const & countryId, MapFileType type) |
| 824 | { |