From 24f54500fcbe1ede3914e4ff46a859004ed46a49 Mon Sep 17 00:00:00 2001 From: uholeschak Date: Wed, 24 Jan 2018 12:16:04 +0100 Subject: [PATCH] Refresh apk listing --- Tools/ApkUploader/ApkUploader/FormMain.cs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Tools/ApkUploader/ApkUploader/FormMain.cs b/Tools/ApkUploader/ApkUploader/FormMain.cs index 469cff986..01ce0f429 100644 --- a/Tools/ApkUploader/ApkUploader/FormMain.cs +++ b/Tools/ApkUploader/ApkUploader/FormMain.cs @@ -404,10 +404,9 @@ private bool ListTracks() } } } - catch (Exception e) + catch (Exception) { - Console.WriteLine(e); - throw; + // ignored } } else @@ -487,6 +486,20 @@ private bool ChangeTrack(string fromTrack, string toTrack) sb.AppendLine($"Unassigned from track: {fromTrack}"); UpdateStatus(sb.ToString()); + ApkListingsListResponse listingsResponse = await edits.Apklistings.List(PackageName, appEdit.Id, currentVersion).ExecuteAsync(_cts.Token); + if (listingsResponse.Listings != null) + { + foreach (ApkListing listing in listingsResponse.Listings) + { + if (listing.RecentChanges != null) + { + await edits.Apklistings.Update(listing, PackageName, appEdit.Id, currentVersion, listing.Language).ExecuteAsync(_cts.Token); + sb.AppendLine($"Changes for language {listing.Language} updated"); + UpdateStatus(sb.ToString()); + } + } + } + EditsResource.CommitRequest commitRequest = edits.Commit(PackageName, appEdit.Id); AppEdit appEditCommit = await commitRequest.ExecuteAsync(_cts.Token); sb.AppendLine($"App edit committed: {appEditCommit.Id}");