[app] Pass locales list to libraries when updating repos
so that we may be sure we're on the same page and, well, not leaving too much to chance
This commit is contained in:
parent
8a7897cba2
commit
72027aa198
|
@ -263,6 +263,9 @@ public class FDroidApp extends Application implements androidx.work.Configuratio
|
|||
Log.d(TAG, "Updating DB locales took: " + (System.currentTimeMillis() - now) + "ms");
|
||||
return true;
|
||||
}).subscribeOn(Schedulers.io()).subscribe();
|
||||
if (repoManager != null) {
|
||||
repoManager.setLocales(App.getLocales());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -537,6 +540,7 @@ public class FDroidApp extends Application implements androidx.work.Configuratio
|
|||
};
|
||||
repoManager = new RepoManager(context, DBHelper.getDb(context), DownloaderFactory.INSTANCE,
|
||||
DownloaderFactory.HTTP_MANAGER, repoUriBuilder);
|
||||
repoManager.setLocales(App.getLocales());
|
||||
}
|
||||
return repoManager;
|
||||
}
|
||||
|
|
|
@ -465,10 +465,12 @@ public class UpdateService extends JobIntentService {
|
|||
File.createTempFile("dl-", "", cacheDir);
|
||||
final IndexV1Updater updater = new IndexV1Updater(db, tempFileProvider,
|
||||
DownloaderFactory.INSTANCE, repoUriBuilder, compatChecker, listener);
|
||||
updater.setLocales(App.getLocales());
|
||||
result = updater.updateNewRepo(repo, fingerprint);
|
||||
} else {
|
||||
final RepoUpdater updater = new RepoUpdater(cacheDir, db,
|
||||
DownloaderFactory.INSTANCE, repoUriBuilder, compatChecker, listener);
|
||||
updater.setLocales(App.getLocales());
|
||||
result = updater.update(repo, fingerprint);
|
||||
}
|
||||
if (result instanceof IndexUpdateResult.Unchanged) {
|
||||
|
|
Loading…
Reference in New Issue