-
Notifications
You must be signed in to change notification settings - Fork 0
[Hotfix] 사진 업로드 및 포토리뷰 작성 안됨 이슈 해결 #297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This hotfix resolves issues with photo upload and review submission by refactoring the review view model logic, image upload use case, and associated UI behaviors. Key changes include updating the postReview API to accept parameters, refactoring image compression/upload handling to use File objects instead of multipart parameters, and cleaning up redundant view models and logging in network interceptors.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ReviewWriteViewModel.kt | Updated postReview API, introduced saveS3 for file-based image upload, and adjusted UI state handling |
| ReviewWriteRateActivity.kt | Refactored image selection, compression, and review submission workflow with improved permission handling |
| ImageViewModel.kt | Removed redundant code as its functionality was migrated to UploadReviewViewModel |
| ReviewAdapter.kt | Modified image display logic to safely handle nullable image URLs |
| GetImageUrlUseCase.kt | Updated to accept a File rather than a MultipartBody.Part for image upload |
| ReviewRepository.kt | Adjusted interface to support the file-based image upload method |
| TokenInterceptor.kt | Cleaned up unnecessary imports and logging for token header management |
| ReviewRepositoryImpl.kt | Updated repository implementation to build multipart requests from File objects |
Comments suppressed due to low confidence (1)
app/src/main/java/com/eatssu/android/presentation/cafeteria/review/write/ReviewWriteViewModel.kt:39
- The onCompletion block in postReview unconditionally sets the error flag to true, which might override a successful response. Consider either removing this update or conditionally setting the error flag only when an error truly occurs.
_uiState.update { it.copy(loading = false, error = true) }
.../main/java/com/eatssu/android/presentation/cafeteria/review/write/ReviewWriteRateActivity.kt
Outdated
Show resolved
Hide resolved
kangyuri1114
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
굿굿! 배포해주세용
| var error: Boolean = false, | ||
| var isUpload: Boolean = false, | ||
| ) | ||
| sealed class UploadReviewState |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이건 쓰이는 곳 없으면 지우는 게 좋을 것 같습니당
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오옹 근데 그러면 UiState에 끼울게 없습니다...!
Summary
사진 업로드 및 포토리뷰 작성 안됨 이슈를 해결하였습니다.
Describe your changes
zza.webm
Issue
To reviewers