mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
clean up
This commit is contained in:
@@ -619,7 +619,7 @@ class _AssetViewerState extends ConsumerState<AssetViewer> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _onPop<T>(bool didPop, T? result) {
|
void _onPop<T>(bool didPop, T? result) {
|
||||||
ref.read(currentAssetNotifier.notifier).clearAsset(); // clear current asset
|
ref.read(currentAssetNotifier.notifier).clearAsset();
|
||||||
ref.read(currentAssetNotifier.notifier).dispose();
|
ref.read(currentAssetNotifier.notifier).dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class _DelayedAnimationState extends State<_DelayedAnimation> {
|
|||||||
_delayTimer?.cancel();
|
_delayTimer?.cancel();
|
||||||
|
|
||||||
if (widget.show && !oldWidget.show) {
|
if (widget.show && !oldWidget.show) {
|
||||||
// Showing: set duration, then delay, then show
|
// Showing
|
||||||
_currentDuration = widget.showDuration;
|
_currentDuration = widget.showDuration;
|
||||||
if (widget.showDelay == Duration.zero) {
|
if (widget.showDelay == Duration.zero) {
|
||||||
setState(() => _show = true);
|
setState(() => _show = true);
|
||||||
@@ -70,7 +70,7 @@ class _DelayedAnimationState extends State<_DelayedAnimation> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else if (!widget.show && oldWidget.show) {
|
} else if (!widget.show && oldWidget.show) {
|
||||||
// Hiding: delay, then set duration and hide
|
// Hiding
|
||||||
if (widget.hideDelay == Duration.zero) {
|
if (widget.hideDelay == Duration.zero) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_currentDuration = widget.hideDuration;
|
_currentDuration = widget.hideDuration;
|
||||||
|
|||||||
Reference in New Issue
Block a user