Skip to content

Commit

Permalink
Revert "Move showLessonChips logic into _TodoUntilPicker."
Browse files Browse the repository at this point in the history
This reverts commit f16b4b3.
  • Loading branch information
Jonas-Sander committed Dec 7, 2023
1 parent f16b4b3 commit 7bf2922
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions app/lib/homework/homework_dialog/homework_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,12 @@ class HomeworkDialogMainState extends State<HomeworkDialogMain> {
const SizedBox(height: 8),
_CourseTile(state: state),
const _MobileDivider(),
_TodoUntilPicker(state: state),
_TodoUntilPicker(
state: state,
showLessonChips: widget.isEditing
? false
: widget.showDueDateSelectionChips,
),
const _MobileDivider(),
_SubmissionsSwitch(state: state),
const _MobileDivider(),
Expand Down Expand Up @@ -339,13 +344,16 @@ class _SaveButton extends StatelessWidget {

class _TodoUntilPicker extends StatelessWidget {
final Ready state;
final bool showLessonChips;

const _TodoUntilPicker({required this.state});
const _TodoUntilPicker({
required this.state,
required this.showLessonChips,
});

@override
Widget build(BuildContext context) {
final bloc = bloc_lib.BlocProvider.of<HomeworkDialogBloc>(context);
final showLessonChips = !state.isEditing;

return MaxWidthConstraintBox(
child: SafeArea(
Expand Down

0 comments on commit 7bf2922

Please sign in to comment.