Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
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
2 changes: 1 addition & 1 deletion lib/routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ final GoRouter router = GoRouter(
GoRoute(
name: 'settings',
path: '/settings',
builder: (BuildContext context, GoRouterState state) => const SettingsPage(),
builder: (BuildContext context, GoRouterState state) => SettingsPage(),
routes: <GoRoute>[
GoRoute(
name: 'general',
Expand Down
2 changes: 1 addition & 1 deletion lib/search/pages/search_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ class _SearchPageState extends State<SearchPage> with AutomaticKeepAliveClientMi
title: Material(
color: Colors.transparent,
borderRadius: BorderRadius.circular(50),
elevation: 8,
child: Stack(
children: [
TextField(
Expand Down Expand Up @@ -250,6 +249,7 @@ class _SearchPageState extends State<SearchPage> with AutomaticKeepAliveClientMi
)
: null,
prefixIcon: const Icon(Icons.search_rounded),
contentPadding: const EdgeInsets.fromLTRB(12, 20, 12, 12),
),
),
],
Expand Down
2 changes: 1 addition & 1 deletion lib/settings/pages/general_settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ class _GeneralSettingsPageState extends State<GeneralSettingsPage> with SingleTi
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: ToggleOption(
description: l10n.scrapeMissingPreviews,
description: l10n.scrapeMissingLinkPreviews,
subtitle: l10n.scrapeMissingPreviews,
value: scrapeMissingPreviews,
iconEnabled: Icons.image_search_rounded,
Expand Down
10 changes: 8 additions & 2 deletions lib/settings/pages/settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ class SettingTopic {
}

class SettingsPage extends StatelessWidget {
const SettingsPage({super.key});
final SearchController _searchController = SearchController();

SettingsPage({super.key});

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -53,9 +55,13 @@ class SettingsPage extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 18),
child: FocusableActionDetector(
onFocusChange: (focused) {
if (focused) FocusScope.of(context).unfocus();
if (focused) {
FocusScope.of(context).unfocus();
_searchController.text = '';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't clear the text ? settings_page.dart#L111

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for me. 😞 Here is the behavior I see in develop.

qemu-system-x86_64_8ydykT2MeH.mp4

}
},
child: SearchAnchor.bar(
searchController: _searchController,
barBackgroundColor: MaterialStatePropertyAll(Theme.of(context).colorScheme.surfaceVariant),
barElevation: MaterialStateProperty.all(0),
barHintText: l10n.search,
Expand Down