immich icon indicating copy to clipboard operation
immich copied to clipboard

feat(mobile): Navigate back on memories

Open YarosMallorca opened this issue 8 months ago • 4 comments
trafficstars

Description

Implemented a way to return to the previous memory on the mobile app by clicking on the left side of the screen.

YarosMallorca avatar Mar 03 '25 18:03 YarosMallorca

Neat improvement. I got some error triggered while navigating

I/flutter ( 9676): FlutterError - Catch all: RangeError (length): Invalid value: Only valid value is 0: 19 
I/flutter ( 9676):  #0      List.[] (dart:core-patch/growable_array.dart)
I/flutter ( 9676): #1      _CastListBase.[] (dart:_internal/cast.dart:99:38)
I/flutter ( 9676): #2      MemoryPage.build.onAssetChanged (package:immich_mobile/pages/photos/memory.page.dart:192:47)
I/flutter ( 9676): #3      _PageViewState.build.<anonymous closure> (package:flutter/src/widgets/page_view.dart:915:34)
I/flutter ( 9676): #4      _NotificationElement.onNotification (package:flutter/src/widgets/notification_listener.dart:130:38)
I/flutter ( 9676): #5      _NotificationNode.dispatchNotification (package:flutter/src/widgets/framework.dart:3403:18)
I/flutter ( 9676): #6      _NotificationNode.dispatchNotification (package:flutter/src/widgets/framework.dart:3406:13)
I/flutter ( 9676): #7      _NotificationNode.dispatchNotification (package:flutter/src/widgets/framework.dart:3406:13)
I/flutter ( 9676): #8      Element.dispatchNotification (package:flutter/src/widgets/framework.dart:5077:24)
I/flutter ( 9676): #9      Notification.dispatch (package:flutter/src/widgets/notification_listener.dart:60:13)
I/flutter ( 9676): #10     ScrollActivity.dispatchScrollUpdateNotification (package:flutter/src/widgets/scroll_activity.dart:104:92)
I/flutter ( 9676): #11     ScrollPosition.didUpdateScrollPositionBy (package:flutter/src/widgets/scroll_position.dart:1032:15)
I/flutter ( 9676): #12     ScrollPositionWithSingleContext.jumpTo (package:flutter/src/widgets/scroll_position_with_single_context.dart:205:7)
I/flutter ( 9676): #13     PageController.jumpToPage (package:flutter/src/widgets/page_view.dart:215:14)
I/flutter ( 9676): #14     MemoryPage.build.toPreviousMemory.<anonymous closure>.<anonymous closure> (package:immich_mobile/pages/photos/memory.page.dart:88:22)
I/flutter ( 9676): #15     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1397:15)
I/flutter ( 9676): #16     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1331:11)
I/flutter ( 9676): #17     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1176:5)
I/flutter ( 9676): #18     _invoke (dart:ui/hooks.dart:312:13)
I/flutter ( 9676): #19     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:419:5)
I/flutter ( 9676): #20     _drawFrame (dart:ui/hooks.dart:283:31)
I/flutter ( 9676): 

alextran1502 avatar Mar 04 '25 04:03 alextran1502

@alextran1502 ~~I'll try to reproduce this error and fix it. Which Flutter version did you use for testing?~~

Confirmed; can reproduce. Will look into it.

YarosMallorca avatar Mar 04 '25 08:03 YarosMallorca

Doing this: https://github.com/immich-app/immich/pull/16545/commits/73b096060645c581234fa6f06831947c6d881a39 solved the issue. However, I'm not sure if this is the preferred fix.

@alextran1502 Please review again and see if the error is gone.

YarosMallorca avatar Mar 04 '25 11:03 YarosMallorca