mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-04-17 11:49: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(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
category.toString().split('.').last,
|
category.displayLabel,
|
||||||
style: Theme.of(context).textTheme.headlineSmall,
|
style: Theme.of(context).textTheme.headlineSmall,
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
IconButton(
|
IconButton(
|
||||||
tooltip: 'View more ${category.toString().split('.').last}',
|
tooltip: 'View more ${category.displayLabel}',
|
||||||
icon: const Icon(Icons.arrow_forward_ios),
|
icon: const Icon(Icons.arrow_forward_ios),
|
||||||
onPressed: onTap ?? openSearch,
|
onPressed: onTap ?? openSearch,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,23 @@ import 'package:vaani/shared/extensions/model_conversions.dart';
|
||||||
|
|
||||||
enum SearchResultCategory { books, authors, series, tags, narrators }
|
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 {
|
class SearchResultPage extends HookConsumerWidget {
|
||||||
const SearchResultPage({
|
const SearchResultPage({
|
||||||
super.key,
|
super.key,
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,9 @@ class PlayerWhenMinimized extends HookConsumerWidget {
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
player.seek(
|
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