-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* chore: 사용되지 않는 interface 파일 삭제 * refactor: PhotoAttachFragment의 uriSelectedListener가 초기화 되지 않았을 때 예외 구체화 * refactor: formDataName 정의를 위한 String 상수를 FileUtils.kt로 이동 * feat: 마이 페이지에서 프로필 이미지 변경 기능 구현 * refactor: MyPageMenuHandler -> MyPageHandler로 이름 변경 * feat: 프로필 이미지 변경 실패 메시지 추가 및 예외 처리 * ui: 메인 화면 프로필 사진 테두리 디자인 수정 * refactor: 마이페이지에서 네트워크 요청 대신 캐시 메모리로 멤버 프로필 로드 * feat: SharedViewModel에 Hilt 적용 및 멤버 프로필 로직 추가 * feat: UserInfoPreferencesManager에 프로필 사진, 닉네임, 복구 코드 관련 로직 추가 * feat: 메인 화면 진입 시 멤버 프로필 불러오는 로직 추가 * feat: 메인에서 마이페이지 이동 시 ActivityResultLauncher 적용 * ui: 타임라인 타이틀 사용자 닉네임 표시 * refactor: 불필요한 데이터 바인딩 변수 제거 * refactor: ApiResult의 제네릭 타입 제약 제거 * refactor: MyPageRemoteDataSource 추상화 추가 * refactor: MyPageRemoteDataSource 추상화 적용 * refactor: MyPageLocalDataSource 추상화 추가 * refactor: UserInfoPreferencesManager가 MyPageLocalDataSource를 구현하도록 수정 * refactor: MyPageLocalDataSource 추상화 적용 * refactor: SharedPreferencesModule 추가 * refactor: MyPageDefaultRepository에 MyPageLocalDataSource 추가 * refactor: 메인 화면, 마이페이지 화면에 MyPageDefaultRepository 적용 * refactor: 프로퍼티 이름에서 멤버 변수를 뜻하는 m 키워드 제거 * refactor: 닉네임, 복구코드 관련 메서드 반환 타입 non-nullable로 수정 * refactor: 바인딩 어댑터 formatNickname 가독성 개선 * style: 컨벤션에 맞게 메서드 순서 변경 * delete: 불필요한 drawableRes 파일 삭제 * ui: 프로필 사진 수정 버튼 터치 영역 확대 * refactor: MyPageActivity 메서드 순서 변경 * fix: StaccatoDetailResponse 응답값 매핑 오류 수정 #606 (#607) * fix: 오타 수정 * refactor: 바인딩 변수 네이밍 변경 menuHandler -> myPageHandler * refactor: EMPTY_STRING를 MemberProfile 내부로 이동 --------- Co-authored-by: linirini <[email protected]>
- Loading branch information
Showing
31 changed files
with
393 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
android/Staccato_AN/app/src/main/java/com/on/staccato/data/module/SharedPreferencesModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.on.staccato.data.module | ||
|
||
import android.content.Context | ||
import com.on.staccato.data.UserInfoPreferencesManager | ||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.android.qualifiers.ApplicationContext | ||
import dagger.hilt.components.SingletonComponent | ||
import javax.inject.Singleton | ||
|
||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
object SharedPreferencesModule { | ||
@Singleton | ||
@Provides | ||
fun provideMemberProfileManager( | ||
@ApplicationContext context: Context, | ||
): UserInfoPreferencesManager = UserInfoPreferencesManager(context) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
android/Staccato_AN/app/src/main/java/com/on/staccato/data/mypage/MyPageLocalDataSource.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.on.staccato.data.mypage | ||
|
||
import com.on.staccato.domain.model.MemberProfile | ||
|
||
interface MyPageLocalDataSource { | ||
suspend fun getMemberProfile(): MemberProfile | ||
|
||
suspend fun updateMemberProfile(memberProfile: MemberProfile) | ||
|
||
suspend fun updateProfileImageUrl(url: String?) | ||
} |
12 changes: 12 additions & 0 deletions
12
android/Staccato_AN/app/src/main/java/com/on/staccato/data/mypage/MyPageRemoteDataSource.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.on.staccato.data.mypage | ||
|
||
import com.on.staccato.data.ApiResult | ||
import com.on.staccato.data.dto.mypage.MemberProfileResponse | ||
import com.on.staccato.data.dto.mypage.ProfileImageResponse | ||
import okhttp3.MultipartBody | ||
|
||
interface MyPageRemoteDataSource { | ||
suspend fun loadMemberProfile(): ApiResult<MemberProfileResponse> | ||
|
||
suspend fun updateProfileImage(profileImageFile: MultipartBody.Part): ApiResult<ProfileImageResponse> | ||
} |
18 changes: 18 additions & 0 deletions
18
...d/Staccato_AN/app/src/main/java/com/on/staccato/data/mypage/MyPageRemoteDataSourceImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.on.staccato.data.mypage | ||
|
||
import com.on.staccato.data.ApiResult | ||
import com.on.staccato.data.dto.mypage.MemberProfileResponse | ||
import com.on.staccato.data.dto.mypage.ProfileImageResponse | ||
import okhttp3.MultipartBody | ||
import javax.inject.Inject | ||
|
||
class MyPageRemoteDataSourceImpl | ||
@Inject | ||
constructor( | ||
private val myPageApiService: MyPageApiService, | ||
) : MyPageRemoteDataSource { | ||
override suspend fun loadMemberProfile(): ApiResult<MemberProfileResponse> = myPageApiService.getMemberProfile() | ||
|
||
override suspend fun updateProfileImage(profileImageFile: MultipartBody.Part): ApiResult<ProfileImageResponse> = | ||
myPageApiService.postProfileImageChange(profileImageFile) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
android/Staccato_AN/app/src/main/java/com/on/staccato/domain/repository/MyPageRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
package com.on.staccato.domain.repository | ||
|
||
import com.on.staccato.data.ApiResult | ||
import com.on.staccato.data.dto.mypage.ProfileImageResponse | ||
import com.on.staccato.domain.model.MemberProfile | ||
import okhttp3.MultipartBody | ||
|
||
interface MyPageRepository { | ||
suspend fun getMemberProfile(): ApiResult<MemberProfile> | ||
|
||
suspend fun changeProfileImage(profileImageFile: MultipartBody.Part): ApiResult<ProfileImageResponse> | ||
suspend fun changeProfileImage(profileImageFile: MultipartBody.Part): ApiResult<String?> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.