You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-06-23 04:38:12 +02:00
Refactor mobile to use OpenApi generated SDK (#336)
This commit is contained in:
@ -73,10 +73,12 @@ class UploadProfileImageState {
|
||||
class UploadProfileImageNotifier
|
||||
extends StateNotifier<UploadProfileImageState> {
|
||||
UploadProfileImageNotifier(this._userSErvice)
|
||||
: super(UploadProfileImageState(
|
||||
profileImagePath: '',
|
||||
status: UploadProfileStatus.idle,
|
||||
));
|
||||
: super(
|
||||
UploadProfileImageState(
|
||||
profileImagePath: '',
|
||||
status: UploadProfileStatus.idle,
|
||||
),
|
||||
);
|
||||
|
||||
final UserService _userSErvice;
|
||||
|
||||
@ -88,8 +90,9 @@ class UploadProfileImageNotifier
|
||||
if (res != null) {
|
||||
debugPrint("Succesfully upload profile image");
|
||||
state = state.copyWith(
|
||||
status: UploadProfileStatus.success,
|
||||
profileImagePath: res.profileImagePath);
|
||||
status: UploadProfileStatus.success,
|
||||
profileImagePath: res.profileImagePath,
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -100,4 +103,5 @@ class UploadProfileImageNotifier
|
||||
|
||||
final uploadProfileImageProvider =
|
||||
StateNotifierProvider<UploadProfileImageNotifier, UploadProfileImageState>(
|
||||
((ref) => UploadProfileImageNotifier(ref.watch(userServiceProvider))));
|
||||
((ref) => UploadProfileImageNotifier(ref.watch(userServiceProvider))),
|
||||
);
|
||||
|
Reference in New Issue
Block a user