fix: automate graduate timetable read and refine blue glass Dock

This commit is contained in:
Codex
2026-10-13 17:50:04 +08:00
parent 8f20a341c4
commit 476ef097ee
23 changed files with 1072 additions and 176 deletions
@@ -22,7 +22,11 @@ class _SchoolAuthPageState extends State<SchoolAuthPage> {
void initState() {
super.initState();
widget.session.addListener(_changed);
WidgetsBinding.instance.addPostFrameCallback((_) => _changed());
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!mounted) return;
widget.session.setReadingActive(true);
_changed();
});
}
void _changed() {
@@ -80,6 +84,7 @@ class _SchoolAuthPageState extends State<SchoolAuthPage> {
@override
void dispose() {
widget.session.removeListener(_changed);
widget.session.setReadingActive(false);
super.dispose();
}
@@ -96,10 +101,8 @@ class _SchoolAuthPageState extends State<SchoolAuthPage> {
icon: const Icon(Icons.refresh_rounded),
),
IconButton(
tooltip: '重试读取',
onPressed: _saving
? null
: (s.requestingExams ? s.openExams : s.openTimetable),
tooltip: '读取当前页面',
onPressed: _saving ? null : s.readCurrentPage,
icon: const Icon(Icons.sync_rounded),
),
],