Skip to content
This repository has been archived by the owner on Apr 25, 2022. It is now read-only.

Commit

Permalink
fix(timetable): correct null check
Browse files Browse the repository at this point in the history
  • Loading branch information
CCXXXI committed Oct 25, 2021
1 parent 15e3231 commit a6f2bf8
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/timetable/timetable_menu/timetable_menu_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,14 @@ class TimetableMenuPage extends StatelessWidget {
user.id == null ? const Text('需先登录公共数据库') : null,
enabled: user.id != null,
trailing: const FaIcon(FontAwesomeIcons.fileExport),
onTap: Url.ics(
user.id!,
user.password!,
EcnuLogic.guessYear(DateTime.now()),
EcnuLogic.guessSemester(DateTime.now()),
).launch,
onTap: user.id == null
? null
: Url.ics(
user.id!,
user.password!,
EcnuLogic.guessYear(DateTime.now()),
EcnuLogic.guessSemester(DateTime.now()),
).launch,
),
ListTile(
title: const Text('壁纸'),
Expand Down

0 comments on commit a6f2bf8

Please sign in to comment.