[PR #1561] [MERGED] refactor(mobile): introduce Album & User classes #9140

Closed
opened 2026-02-05 13:59:14 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/1561
Author: @fyfrey
Created: 2/5/2023
Status: Merged
Merged: 2/6/2023
Merged by: @alextran1502

Base: mainHead: dev/mobile-album-user-classes


📝 Commits (1)

  • 6a395ea refactor(mobile): introduce Album & User classes

📊 Changes

25 files changed (+475 additions, -255 deletions)

View changed files

📝 mobile/lib/modules/album/providers/album.provider.dart (+14 -14)
📝 mobile/lib/modules/album/providers/album_viewer.provider.dart (+3 -4)
📝 mobile/lib/modules/album/providers/shared_album.provider.dart (+25 -22)
📝 mobile/lib/modules/album/providers/suggested_shared_users.provider.dart (+3 -3)
📝 mobile/lib/modules/album/services/album.service.dart (+37 -31)
📝 mobile/lib/modules/album/services/album_cache.service.dart (+10 -13)
📝 mobile/lib/modules/album/ui/add_to_album_bottom_sheet.dart (+5 -5)
📝 mobile/lib/modules/album/ui/add_to_album_sliverlist.dart (+28 -29)
📝 mobile/lib/modules/album/ui/album_thumbnail_card.dart (+3 -2)
📝 mobile/lib/modules/album/ui/album_thumbnail_listtile.dart (+3 -2)
📝 mobile/lib/modules/album/ui/album_viewer_appbar.dart (+20 -23)
📝 mobile/lib/modules/album/ui/album_viewer_editable_title.dart (+5 -8)
📝 mobile/lib/modules/album/views/album_viewer_page.dart (+47 -56)
📝 mobile/lib/modules/album/views/library_page.dart (+3 -3)
📝 mobile/lib/modules/album/views/select_additional_user_for_sharing_page.dart (+10 -9)
📝 mobile/lib/modules/album/views/select_user_for_sharing_page.dart (+6 -6)
📝 mobile/lib/modules/album/views/sharing_page.dart (+3 -3)
📝 mobile/lib/modules/home/ui/control_bottom_app_bar.dart (+4 -4)
📝 mobile/lib/modules/home/views/home_page.dart (+5 -5)
📝 mobile/lib/routing/router.dart (+1 -1)

...and 5 more files

📄 Description

  • replace usages of AlbumResponseDto across the app with new class Album
  • replace usages of UserResponseDto across the app with new class User
  • removes reliance on openapi imports from most classes

Currently, Album is always a remote album, so local albums are not implemented yet. Since this is purely a refactor, no functionality or behavior should have changed in the app.

This is the next stepping stone to add offline support down the road.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/1561 **Author:** [@fyfrey](https://github.com/fyfrey) **Created:** 2/5/2023 **Status:** ✅ Merged **Merged:** 2/6/2023 **Merged by:** [@alextran1502](https://github.com/alextran1502) **Base:** `main` ← **Head:** `dev/mobile-album-user-classes` --- ### 📝 Commits (1) - [`6a395ea`](https://github.com/immich-app/immich/commit/6a395eaf5f39b47646ec48a81fb38062c6bbebe5) refactor(mobile): introduce Album & User classes ### 📊 Changes **25 files changed** (+475 additions, -255 deletions) <details> <summary>View changed files</summary> 📝 `mobile/lib/modules/album/providers/album.provider.dart` (+14 -14) 📝 `mobile/lib/modules/album/providers/album_viewer.provider.dart` (+3 -4) 📝 `mobile/lib/modules/album/providers/shared_album.provider.dart` (+25 -22) 📝 `mobile/lib/modules/album/providers/suggested_shared_users.provider.dart` (+3 -3) 📝 `mobile/lib/modules/album/services/album.service.dart` (+37 -31) 📝 `mobile/lib/modules/album/services/album_cache.service.dart` (+10 -13) 📝 `mobile/lib/modules/album/ui/add_to_album_bottom_sheet.dart` (+5 -5) 📝 `mobile/lib/modules/album/ui/add_to_album_sliverlist.dart` (+28 -29) 📝 `mobile/lib/modules/album/ui/album_thumbnail_card.dart` (+3 -2) 📝 `mobile/lib/modules/album/ui/album_thumbnail_listtile.dart` (+3 -2) 📝 `mobile/lib/modules/album/ui/album_viewer_appbar.dart` (+20 -23) 📝 `mobile/lib/modules/album/ui/album_viewer_editable_title.dart` (+5 -8) 📝 `mobile/lib/modules/album/views/album_viewer_page.dart` (+47 -56) 📝 `mobile/lib/modules/album/views/library_page.dart` (+3 -3) 📝 `mobile/lib/modules/album/views/select_additional_user_for_sharing_page.dart` (+10 -9) 📝 `mobile/lib/modules/album/views/select_user_for_sharing_page.dart` (+6 -6) 📝 `mobile/lib/modules/album/views/sharing_page.dart` (+3 -3) 📝 `mobile/lib/modules/home/ui/control_bottom_app_bar.dart` (+4 -4) 📝 `mobile/lib/modules/home/views/home_page.dart` (+5 -5) 📝 `mobile/lib/routing/router.dart` (+1 -1) _...and 5 more files_ </details> ### 📄 Description - replace usages of `AlbumResponseDto` across the app with new class `Album` - replace usages of `UserResponseDto` across the app with new class `User` - removes reliance on openapi imports from most classes Currently, `Album` is always a remote album, so local albums are not implemented yet. Since this is purely a refactor, no functionality or behavior should have changed in the app. This is the next stepping stone to add offline support down the road. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 13:59:14 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#9140