Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add chapter numbers to study overview #1396

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/src/view/study/study_bottom_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,10 @@ class _StudyChaptersMenuState extends ConsumerState<_StudyChaptersMenu> {
for (final chapter in state.study.chapters)
PlatformListTile(
key: chapter.id == state.currentChapter.id ? currentChapterKey : null,
title: Text(chapter.name, maxLines: 2),
title: Text(
'Chapter ${state.study.chapters.indexOf(chapter) + 1}: ${chapter.name}',
maxLines: 2,
),
onTap: () {
ref.read(studyControllerProvider(widget.id).notifier).goToChapter(chapter.id);
Navigator.of(context).pop();
Expand Down
2 changes: 1 addition & 1 deletion lib/src/view/study/study_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class _StudyScreenState extends ConsumerState<_StudyScreen> with TickerProviderS
return PlatformScaffold(
appBar: PlatformAppBar(
title: AutoSizeText(
widget.studyState.currentChapterTitle,
'Chapter ${widget.studyState.study.chapters.indexOf(widget.studyState.currentChapterMeta) + 1}: ${widget.studyState.currentChapterTitle}',
maxLines: 2,
minFontSize: 14,
overflow: TextOverflow.ellipsis,
Expand Down
Loading