Skip to content

Commit

Permalink
schedules: fix schedule scrolling after confirming toggling read
Browse files Browse the repository at this point in the history
When confirming toggling read, the schedule was scrolling to a different position,
however it should stay at its current position.
  • Loading branch information
wfleischer committed Nov 8, 2024
1 parent 2159c54 commit 691693b
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions lib/src/schedules/presentations/schedule_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ class _SchedulePageState extends ConsumerState<SchedulePage> {
int topDayIndex = 0;
ScheduleKey? scheduleKey;

@override
void didChangeDependencies() {
super.didChangeDependencies();
final planId = ModalRoute.of(context)!.settings.arguments as String;
final bookmark = ref.read(planProviderFamily(planId)).bookmark;
resetTopDayIndex(bookmark);
}

void resetTopDayIndex(Bookmark? bookmark) =>
setState(() => topDayIndex = bookmark == null
? 0
Expand Down

0 comments on commit 691693b

Please sign in to comment.