mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-04-04 05:19:38 +00:00
fix(accessibility): address review feedback
This commit is contained in:
parent
b552e9843c
commit
53f58aeb8b
3 changed files with 22 additions and 3 deletions
|
|
@ -307,12 +307,12 @@ class SearchResultMiniSection extends HookConsumerWidget {
|
|||
Row(
|
||||
children: [
|
||||
Text(
|
||||
category.toString().split('.').last,
|
||||
category.displayLabel,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
),
|
||||
const Spacer(),
|
||||
IconButton(
|
||||
tooltip: 'View more ${category.toString().split('.').last}',
|
||||
tooltip: 'View more ${category.displayLabel}',
|
||||
icon: const Icon(Icons.arrow_forward_ios),
|
||||
onPressed: onTap ?? openSearch,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -7,6 +7,23 @@ import 'package:vaani/shared/extensions/model_conversions.dart';
|
|||
|
||||
enum SearchResultCategory { books, authors, series, tags, narrators }
|
||||
|
||||
extension SearchResultCategoryDisplay on SearchResultCategory {
|
||||
String get displayLabel {
|
||||
switch (this) {
|
||||
case SearchResultCategory.books:
|
||||
return 'Books';
|
||||
case SearchResultCategory.authors:
|
||||
return 'Authors';
|
||||
case SearchResultCategory.series:
|
||||
return 'Series';
|
||||
case SearchResultCategory.tags:
|
||||
return 'Tags';
|
||||
case SearchResultCategory.narrators:
|
||||
return 'Narrators';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class SearchResultPage extends HookConsumerWidget {
|
||||
const SearchResultPage({
|
||||
super.key,
|
||||
|
|
|
|||
|
|
@ -123,7 +123,9 @@ class PlayerWhenMinimized extends HookConsumerWidget {
|
|||
),
|
||||
onPressed: () {
|
||||
player.seek(
|
||||
player.positionInBook - const Duration(seconds: 30),
|
||||
player.positionInBook > const Duration(seconds: 30)
|
||||
? player.positionInBook - const Duration(seconds: 30)
|
||||
: Duration.zero,
|
||||
);
|
||||
},
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue