diff --git a/auth/lib/ui/code_widget.dart b/auth/lib/ui/code_widget.dart index e74091758..68b416855 100644 --- a/auth/lib/ui/code_widget.dart +++ b/auth/lib/ui/code_widget.dart @@ -28,12 +28,10 @@ import 'package:move_to_background/move_to_background.dart'; class CodeWidget extends StatefulWidget { final Code code; - final bool hasError; const CodeWidget( this.code, { super.key, - this.hasError = false, }); @override @@ -92,11 +90,7 @@ class _CodeWidgetState extends State { _isInitialized = true; } final l10n = context.l10n; - return IgnorePointer( - ignoring: widget.hasError, - child: Opacity( - opacity: widget.hasError ? 0.5 : 1.0, - child: Container( + return Container( margin: const EdgeInsets.only(left: 16, right: 16, bottom: 8, top: 8), child: Builder( builder: (context) { @@ -230,8 +224,8 @@ class _CodeWidgetState extends State { ); }, ), - ), - ), + + ); } diff --git a/auth/lib/ui/home_page.dart b/auth/lib/ui/home_page.dart index 1e46890f4..18446acf4 100644 --- a/auth/lib/ui/home_page.dart +++ b/auth/lib/ui/home_page.dart @@ -253,32 +253,30 @@ class _HomePageState extends State { ), centerTitle: true, actions: [ - if (_allCodes?.state == AllCodesState.value) - IconButton( - icon: _showSearchBox - ? const Icon(Icons.clear) - : const Icon(Icons.search), - tooltip: l10n.search, - onPressed: () { - setState( - () { - _showSearchBox = !_showSearchBox; - if (!_showSearchBox) { - _textController.clear(); - _searchText = ""; - } else { - _searchText = _textController.text; - } - _applyFilteringAndRefresh(); - }, - ); - }, - ), + IconButton( + icon: _showSearchBox + ? const Icon(Icons.clear) + : const Icon(Icons.search), + tooltip: l10n.search, + onPressed: () { + setState( + () { + _showSearchBox = !_showSearchBox; + if (!_showSearchBox) { + _textController.clear(); + _searchText = ""; + } else { + _searchText = _textController.text; + } + _applyFilteringAndRefresh(); + }, + ); + }, + ), ], ), floatingActionButton: !_hasLoaded || (_allCodes?.codes.isEmpty ?? true) || - _allCodes?.state == AllCodesState.error || !PreferenceService.instance.hasShownCoachMark() ? null : _getFab(), @@ -361,7 +359,6 @@ class _HomePageState extends State { return ClipRect( child: CodeWidget( _filteredCodes[newIndex], - hasError: _allCodes?.state == AllCodesState.error, ), ); }),