Skip to content
This repository was archived by the owner on Jan 23, 2019. It is now read-only.

Commit 82cf1ea

Browse files
committed
Fix locales not being reloaded after synchronizing
1 parent bd2fafd commit 82cf1ea

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/app/src/main/java/io/github/lonamiwebs/stringlate/activities/translate/TranslateActivity.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ protected void onCreate(Bundle savedInstanceState) {
109109
// Retrieve the owner and repository name
110110
mRepo = RepoHandler.fromBundle(this, getIntent().getBundleExtra(EXTRA_REPO));
111111
setTitle(mRepo.toString());
112+
loadResources();
113+
}
112114

115+
private void loadResources() {
113116
if (mRepo.hasDefaultLocale()) {
114117
mDefaultResources = mRepo.loadDefaultResources();
115118
loadLocalesSpinner();
@@ -307,8 +310,7 @@ public void onProgressFinished(String description, boolean status) {
307310
if (description != null)
308311
Toast.makeText(getApplicationContext(), description, Toast.LENGTH_SHORT).show();
309312

310-
mDefaultResources = mRepo.loadDefaultResources();
311-
loadLocalesSpinner();
313+
loadResources();
312314
}
313315
}, keepChanges);
314316
}

src/app/src/main/java/io/github/lonamiwebs/stringlate/classes/repos/RepoHandler.java

+1
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ private void doCopyResources(final File clonedDir, final ArrayList<File> foundRe
429429
}
430430

431431
GitWrapper.deleteRepo(clonedDir); // Clean resources
432+
loadLocales(); // Reload the locales
432433
}
433434

434435
//endregion

0 commit comments

Comments
 (0)