Add immediate refresh when new external calendars are created

When users add a new external calendar, events now appear instantly instead
of waiting for the next 5-minute auto-refresh cycle or manual refresh.

Changes:
- Modified ExternalCalendarModal to return newly created calendar ID
- Enhanced on_success callback to immediately fetch events for new calendar
- Added proper visibility checking and error handling
- Removed unused imports to clean up compilation warnings

User experience improvement:
- Before: Add calendar → wait 5 minutes → see events
- After: Add calendar → events appear immediately

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Connor Johnstone
2025-09-03 22:15:03 -04:00
parent 28b3946e86
commit 75d9149c76
3 changed files with 48 additions and 5 deletions

View File

@@ -1,6 +1,5 @@
use crate::components::CalendarListItem;
use crate::services::calendar_service::{UserInfo, ExternalCalendar};
use chrono::{DateTime, Local, TimeZone, Utc};
use web_sys::HtmlSelectElement;
use yew::prelude::*;
use yew_router::prelude::*;