mirror of
https://github.com/immich-app/immich.git
synced 2026-07-28 14:47:30 -07:00
fix: apply disabled styling to UI buttons
This commit is contained in:
@@ -43,21 +43,10 @@ class _ImmichColumnButtonState extends State<ImmichColumnButton> {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void>? _onPressed() {
|
||||
if (_isDisabled) {
|
||||
return null;
|
||||
}
|
||||
VoidCallback? get _onPressed => _isDisabled ? null : () => _runAction(widget.onPressed);
|
||||
|
||||
return _runAction(widget.onPressed);
|
||||
}
|
||||
|
||||
Future<void>? _onLongPress() {
|
||||
if (_isDisabled || widget.onLongPress == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return _runAction(widget.onLongPress!);
|
||||
}
|
||||
VoidCallback? get _onLongPress =>
|
||||
_isDisabled || widget.onLongPress == null ? null : () => _runAction(widget.onLongPress!);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -44,21 +44,10 @@ class _ImmichIconButtonState extends State<ImmichIconButton> {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void>? _onPressed() {
|
||||
if (_isDisabled) {
|
||||
return null;
|
||||
}
|
||||
VoidCallback? get _onPressed => _isDisabled ? null : () => _runAction(widget.onPressed);
|
||||
|
||||
return _runAction(widget.onPressed);
|
||||
}
|
||||
|
||||
Future<void>? _onLongPress() {
|
||||
if (_isDisabled || widget.onLongPress == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return _runAction(widget.onLongPress!);
|
||||
}
|
||||
VoidCallback? get _onLongPress =>
|
||||
_isDisabled || widget.onLongPress == null ? null : () => _runAction(widget.onLongPress!);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -46,21 +46,10 @@ class _ImmichTextButtonState extends State<ImmichTextButton> {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void>? _onPressed() {
|
||||
if (_isDisabled) {
|
||||
return null;
|
||||
}
|
||||
VoidCallback? get _onPressed => _isDisabled ? null : () => _runAction(widget.onPressed);
|
||||
|
||||
return _runAction(widget.onPressed);
|
||||
}
|
||||
|
||||
Future<void>? _onLongPress() {
|
||||
if (_isDisabled || widget.onLongPress == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return _runAction(widget.onLongPress!);
|
||||
}
|
||||
VoidCallback? get _onLongPress =>
|
||||
_isDisabled || widget.onLongPress == null ? null : () => _runAction(widget.onLongPress!);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
Reference in New Issue
Block a user