-
Notifications
You must be signed in to change notification settings - Fork 0
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
[feat] 관심 축제 등록/해제 API 연동 및 알림(fcm) 기능 추가(미완) #232
Conversation
GoToAppSetting -> NavigateToAppSetting 네이밍 변경(화면 이동은 전부 NavigateToDestination 형태로)
호출 되지 않음...
알림을 보내는 단위는 부스가 아니라 해당 축제 따라서 Booth -> Festival 로 네이밍 변경 LikedBooth -> LikedFestival Repository 로 이동
# Conflicts: # core/data/src/main/kotlin/com/unifest/android/core/data/di/RepositoryModule.kt # core/network/src/main/kotlin/com/unifest/android/core/network/service/UnifestService.kt
likedFestivalRepository.insertLikedFestivalAtHome(festival) | ||
_uiEvent.send(HomeUiEvent.ShowSnackBar(UiText.StringResource(R.string.home_add_interest_festival_snack_bar))) | ||
likedFestivalRepository.registerLikedFestival() |
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.
요부분에서 원래 관심축제 추가시에 insertLikedFestivalAtHome를 이용해서 내부저장소에 저장을 해주는 구조였는데 관심축제 추가 로직이 바뀌면서 현재는 내부 저장소에 저장을 안해주네요
홈 뷰모델에서 observeLikedFestivals가 내부 저장소에서 관심축제를 가져오는데, 현재처럼 진행하자면 registerLikedFestival가 성공하면 내부 저장소에 관심축제를 저장해주거나 해주면 될거같아요. 또 관심축제 삭제할때도 마찬가지고.
likedFestivalRepository.insertLikedFestivalAtSearch(festival) | ||
likedFestivalRepository.registerLikedFestival() | ||
.onSuccess { | ||
likedFestivalRepository.insertLikedFestivalAtSearch(festival) | ||
_uiEvent.send(FestivalUiEvent.ShowToast(UiText.StringResource(R.string.liked_festival_saved_message))) | ||
} | ||
.onFailure { exception -> | ||
_uiEvent.send(FestivalUiEvent.ShowToast(UiText.StringResource(R.string.liked_festival_saved_failed_message))) | ||
} | ||
} | ||
} | ||
|
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.
요부분도 마찬가지로 보입니다
likedFestivalRepository.deleteLikedFestival(festival) | ||
likedFestivalRepository.unregisterLikedFestival() | ||
.onSuccess { | ||
likedFestivalRepository.deleteLikedFestival(festival) | ||
_uiEvent.send(FestivalUiEvent.ShowToast(UiText.StringResource(R.string.liked_festival_removed_message))) | ||
} | ||
.onFailure { exception -> | ||
_uiEvent.send(FestivalUiEvent.ShowToast(UiText.StringResource(R.string.liked_festival_removed_failed_message))) | ||
} | ||
} | ||
} |
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.
요부분도요! 전반적으로 로직 변경때문에 그렇네요
@@ -28,7 +28,7 @@ | |||
<string name="home_add_interest_festival_button">관심 축제 추가하기</string> | |||
<string name="home_add_interest_festival_in_item_button">관심 축제로 추가</string> | |||
<string name="home_add_interest_festival_saved_message">관심 축제로 저장했습니다</string> | |||
<string name="home_add_interest_festival_saved_failed_message">관심 축제로 저장했습니다</string> | |||
<string name="home_add_interest_festival_saved_failed_message">관심 축제로 저장을 실패했습니다.</string> |
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.
아 아니구나.. 요번에 추가된거군요 ㅋㅋㅋ
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.
수고하셨습니다!! 고봉밥이라 틈틈히 봤습니다
아무래도 api가 작동을 안해서 어려우셨을텐데 고생많으셨어요!!
문제될거 없긴한데 혹시 또 모르니 api되면 잘 봐야겠네요
feat)
style)
refactor)
problem)
관심 축제 등록 및 해제 API 가 현재 정상 작동하지 않습니다(400, FCM 처리 실패) 따라서 알림이 정상적으로 동작하는지 확인하지 못했습니다.
기존에 관심 축제 등록 플로우가 하드코딩으로 진행되어있었습니다. ("건국대", festivalId 및 schoolId 1번만 전달), 따라서 관심 축제 등록 및 해제 API 가 정상적으로 동작하기 위해선 각 축제의 고유아이디가 각각 존재해야 합니다.(기획에서 논의되어야 할 부분)
현재 권한요청 플로우가 맵 화면(startDestination) 내에서 현재 위치, 알림 권한을 요청 하는데, 둘다 허용을 할 때는 문제가 없으나, 거부 이후 권한 다시 요청시 권한 요청 로직이 꼬여 버그가 존재합니다.(A 허용, B 거부 시 B 다시 허용 할 경우, A 가 거부되었다고 뜨는 문제) 해당 문제는 fcm 테스트 하면서 해결해보도록 하겠습니다.
P.S 홈 화면 내에서 관심 축제에 이미 추가된 축제의 경우
관심축제로 추가하기
버튼이 안뜨는게 맞을 것 같은데 현재는 전부 다 뜨는 것 같아서요 한번 확인해주시면 좋을 것 같아요(추후 수정이 필요)