upgrade to v1.7.0

This commit is contained in:
wanxp 2022-11-20 02:43:31 +08:00
parent fe111276e9
commit c61b7c0318
2 changed files with 4 additions and 1 deletions

@ -113,6 +113,9 @@ export class DoubanSyncModal extends Modal {
const syncButton = new ButtonComponent(controls)
.setButtonText(i18nHelper.getMessage('110007'))
.onClick(async () => {
if(!await this.plugin.checkLogin(this.context)) {
return;
}
syncButton.setDisabled(true);
if(!this.plugin.statusHolder.startSync(syncConfig)) {
return;

@ -270,7 +270,7 @@ export default class DoubanPlugin extends Plugin {
}
}
private async checkLogin(context: HandleContext):Promise<boolean> {
async checkLogin(context: HandleContext):Promise<boolean> {
if (!context.userComponent.needLogin()) {
await context.userComponent.loginByCookie();
}