mirror of
https://github.com/Wanxp/obsidian-douban.git
synced 2026-04-04 16:48:44 +08:00
upgrade to v1.7.0
This commit is contained in:
parent
fe111276e9
commit
c61b7c0318
@ -113,6 +113,9 @@ export class DoubanSyncModal extends Modal {
|
|||||||
const syncButton = new ButtonComponent(controls)
|
const syncButton = new ButtonComponent(controls)
|
||||||
.setButtonText(i18nHelper.getMessage('110007'))
|
.setButtonText(i18nHelper.getMessage('110007'))
|
||||||
.onClick(async () => {
|
.onClick(async () => {
|
||||||
|
if(!await this.plugin.checkLogin(this.context)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
syncButton.setDisabled(true);
|
syncButton.setDisabled(true);
|
||||||
if(!this.plugin.statusHolder.startSync(syncConfig)) {
|
if(!this.plugin.statusHolder.startSync(syncConfig)) {
|
||||||
return;
|
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()) {
|
if (!context.userComponent.needLogin()) {
|
||||||
await context.userComponent.loginByCookie();
|
await context.userComponent.loginByCookie();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user