mirror of
https://github.com/immich-app/immich.git
synced 2025-07-15 20:38:26 +02:00
refactor(mobile): Activities (#5990)
* refactor: autoroutex pushroute * refactor: autoroutex popRoute * refactor: autoroutex navigate and replace * chore: add doc comments for extension methods * refactor: Add LoggerMixin and refactor Album activities to use mixin * refactor: Activity page * chore: activity user from user constructor * fix: update current asset after build method * refactor: tests with similar structure as lib * chore: remove avoid-declaring-call-method rule from dcm analysis * test: fix proper expect order * test: activity_statistics_provider_test * test: activity_provider_test * test: use proper matchers * test: activity_text_field_test & dismissible_activity_test added * test: add http mock to return transparent image * test: download isar core libs during test * test: add widget tags to widget test cases * test: activity_tile_test * build: currentAlbumProvider to generator * movie add / remove like to activity input tile * test: activities_page_test.dart * chore: better error logs * chore: dismissibleactivity as statelesswidget --------- Co-authored-by: shalong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
d1e16025cf
commit
af32183728
108 changed files with 2847 additions and 826 deletions
mobile/lib/routing
|
@ -340,18 +340,9 @@ class _$AppRouter extends RootStackRouter {
|
|||
);
|
||||
},
|
||||
ActivitiesRoute.name: (routeData) {
|
||||
final args = routeData.argsAs<ActivitiesRouteArgs>();
|
||||
return CustomPage<dynamic>(
|
||||
routeData: routeData,
|
||||
child: ActivitiesPage(
|
||||
args.albumId,
|
||||
appBarTitle: args.appBarTitle,
|
||||
assetId: args.assetId,
|
||||
withAssetThumbs: args.withAssetThumbs,
|
||||
isOwner: args.isOwner,
|
||||
isReadOnly: args.isReadOnly,
|
||||
key: args.key,
|
||||
),
|
||||
child: const ActivitiesPage(),
|
||||
transitionsBuilder: TransitionsBuilders.slideLeft,
|
||||
durationInMilliseconds: 200,
|
||||
opaque: true,
|
||||
|
@ -1587,63 +1578,16 @@ class SharedLinkEditRouteArgs {
|
|||
|
||||
/// generated route for
|
||||
/// [ActivitiesPage]
|
||||
class ActivitiesRoute extends PageRouteInfo<ActivitiesRouteArgs> {
|
||||
ActivitiesRoute({
|
||||
required String albumId,
|
||||
String appBarTitle = "",
|
||||
String? assetId,
|
||||
bool withAssetThumbs = true,
|
||||
bool isOwner = false,
|
||||
bool isReadOnly = false,
|
||||
Key? key,
|
||||
}) : super(
|
||||
class ActivitiesRoute extends PageRouteInfo<void> {
|
||||
const ActivitiesRoute()
|
||||
: super(
|
||||
ActivitiesRoute.name,
|
||||
path: '/activities-page',
|
||||
args: ActivitiesRouteArgs(
|
||||
albumId: albumId,
|
||||
appBarTitle: appBarTitle,
|
||||
assetId: assetId,
|
||||
withAssetThumbs: withAssetThumbs,
|
||||
isOwner: isOwner,
|
||||
isReadOnly: isReadOnly,
|
||||
key: key,
|
||||
),
|
||||
);
|
||||
|
||||
static const String name = 'ActivitiesRoute';
|
||||
}
|
||||
|
||||
class ActivitiesRouteArgs {
|
||||
const ActivitiesRouteArgs({
|
||||
required this.albumId,
|
||||
this.appBarTitle = "",
|
||||
this.assetId,
|
||||
this.withAssetThumbs = true,
|
||||
this.isOwner = false,
|
||||
this.isReadOnly = false,
|
||||
this.key,
|
||||
});
|
||||
|
||||
final String albumId;
|
||||
|
||||
final String appBarTitle;
|
||||
|
||||
final String? assetId;
|
||||
|
||||
final bool withAssetThumbs;
|
||||
|
||||
final bool isOwner;
|
||||
|
||||
final bool isReadOnly;
|
||||
|
||||
final Key? key;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ActivitiesRouteArgs{albumId: $albumId, appBarTitle: $appBarTitle, assetId: $assetId, withAssetThumbs: $withAssetThumbs, isOwner: $isOwner, isReadOnly: $isReadOnly, key: $key}';
|
||||
}
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [MapLocationPickerPage]
|
||||
class MapLocationPickerRoute extends PageRouteInfo<MapLocationPickerRouteArgs> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue