1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-06 23:56:13 +02:00

Mobile: Fixes #10593: Fix plugin list not cached in config screen (#10599)

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
This commit is contained in:
Henry Heino
2024-06-18 02:02:42 -07:00
committed by GitHub
parent d9dadf28cb
commit c972ce223e
3 changed files with 12 additions and 2 deletions

View File

@ -77,6 +77,7 @@ export default class RepositoryApi {
private githubApiUrl_: string;
private contentBaseUrl_: string;
private isUsingDefaultContentUrl_ = true;
private lastInitializedTime_ = 0;
public constructor(baseUrl: string, tempDir: string, appInfo: AppInfo, installMode: InstallMode) {
this.installMode_ = installMode;
@ -102,6 +103,15 @@ export default class RepositoryApi {
await this.loadManifests();
await this.loadRelease();
this.lastInitializedTime_ = Date.now();
}
public async reinitialize() {
// Refresh at most once per minute
if (Date.now() - this.lastInitializedTime_ > 5 * 60000) {
await this.initialize();
}
}
private async loadManifests() {