mirror of
https://github.com/formax68/memoChron.git
synced 2026-07-22 05:45:44 +00:00
1.13.0 fix error when adding new calendar
- skip calendars with empty URLs during fetch - prevents "not found" error when creating new calendar entry - fixes #58
This commit is contained in:
parent
99d26a9508
commit
2c58e5bf54
4 changed files with 7 additions and 5 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "memochron",
|
||||
"name": "MemoChron",
|
||||
"version": "1.12.1",
|
||||
"version": "1.13.0",
|
||||
"minAppVersion": "1.8.9",
|
||||
"description": "Calendar integration and note creation with support for public iCalendar URLs",
|
||||
"author": "Michalis Efstratiadis",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "memochron",
|
||||
"version": "1.11.0",
|
||||
"version": "1.13.0",
|
||||
"description": "Calendar integration and note creation plugin for Obsidian",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@ export class CalendarService {
|
|||
return this.events;
|
||||
}
|
||||
|
||||
const enabledSources = sources.filter((source) => source.enabled);
|
||||
// Filter to only enabled sources that have a URL configured
|
||||
const enabledSources = sources.filter((source) => source.enabled && source.url?.trim());
|
||||
|
||||
if (enabledSources.length === 0) {
|
||||
this.events = [];
|
||||
|
|
@ -179,7 +180,7 @@ export class CalendarService {
|
|||
private scheduleBackgroundRefresh(sources: CalendarSource[]) {
|
||||
// Only schedule a refresh if the cache has actually expired
|
||||
// This respects the refresh interval setting
|
||||
const enabledSources = sources.filter((source) => source.enabled);
|
||||
const enabledSources = sources.filter((source) => source.enabled && source.url?.trim());
|
||||
if (this.needsRefresh(enabledSources, false)) {
|
||||
setTimeout(() => this.fetchCalendars(sources, true), 100);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,5 +39,6 @@
|
|||
"1.11.0": "1.8.9",
|
||||
"1.11.1": "1.8.9",
|
||||
"1.12.0": "1.8.9",
|
||||
"1.12.1": "1.8.9"
|
||||
"1.12.1": "1.8.9",
|
||||
"1.13.0": "1.8.9"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue