Skip to content

Commit

Permalink
exchange press and long press on timetable jump button
Browse files Browse the repository at this point in the history
  • Loading branch information
liplum committed Oct 25, 2023
1 parent a347419 commit 8757ada
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/timetable/page/timetable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,20 @@ class _TimetableBoardPageState extends State<TimetableBoardPage> {
],
),
floatingActionButton: InkWell(
onLongPress: () {
final today = timetable.type.locate(DateTime.now());
if ($currentPos.value != today) {
eventBus.fire(JumpToPosEvent(today));
onLongPress: () async {
if ($displayMode.value == DisplayMode.weekly) {
await selectWeeklyTimetablePageToJump();
} else {
await selectDailyTimetablePageToJump();
}
},
child: AutoHideFAB(
controller: scrollController,
child: const Icon(Icons.undo_rounded),
onPressed: () async {
if ($displayMode.value == DisplayMode.weekly) {
await selectWeeklyTimetablePageToJump();
} else {
await selectDailyTimetablePageToJump();
final today = timetable.type.locate(DateTime.now());
if ($currentPos.value != today) {
eventBus.fire(JumpToPosEvent(today));
}
},
),
Expand Down

0 comments on commit 8757ada

Please sign in to comment.