Skip to content
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

내가 업로드한 노래 전체 보기 #225

Merged
merged 10 commits into from
Nov 29, 2023
Merged

내가 업로드한 노래 전체 보기 #225

merged 10 commits into from
Nov 29, 2023

Conversation

HamBP
Copy link
Member

@HamBP HamBP commented Nov 29, 2023

Issue

Overview

  • 내가 업로드한 노래 목록을 가져올 수 있다.

Screenshot (optional)

@HamBP HamBP self-assigned this Nov 29, 2023
@HamBP HamBP added ✨ feat 기능 개발 🤖 android android labels Nov 29, 2023
Copy link

github-actions bot commented Nov 29, 2023

Test Results

4 tests   4 ✔️  1s ⏱️
1 suites  0 💤
1 files    0

Results for commit 272904e.

♻️ This comment has been updated with latest results.

@HamBP HamBP added this to the 👋 my milestone Nov 29, 2023
@HamBP HamBP linked an issue Nov 29, 2023 that may be closed by this pull request
android:layout_height="match_parent">

<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/mt_my_musics"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저희 이부분 tb_XXX 로 컨벤션 통일했었어용

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고쳐서 푸시했어!
그런데 해당 부분의 컨벤션이 정리된 문서를 찾지는 못 했어 ㅠㅠ
id 변경은 IDE를 통해 자동 리팩터링이 안 되기도 하고, id 컨벤션에 예외가 너무 많아서 컨벤션을 맞추는 비용이 컨벤션을 맞춰서 얻는 이득보다 커지지 않을까?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요거는 우리가 페어프로그래밍할때 이야기했었어! 다른 fragment에 toolbar 사용된 id는 다 tb 로 시작하던데..!

Copy link
Member

@youlalala youlalala Nov 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

정리가 안되어있는듯하네 내가 추가해놓을게! 여러화면에서 자주 사용되는 컴포넌트들은 맞추는게 좋을 것 같아

Comment on lines +47 to +51
val errorType =
if (throwable is CtException) throwable.ctError
else CtErrorType.UN_KNOWN

_events.emit(MyMusicsEvent.ShowMessage(errorType))
Copy link
Member

@youlalala youlalala Nov 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

읽기 편해져서 좋은 것 같네욥 👏🏻

Comment on lines 74 to 84
@Get('ts')
@HttpCode(HTTP_STATUS_CODE.SUCCESS)
async getEncodedChunkFiles(
@Query('music_id') music_id: string,
@Query('fileName') fileName: string,
): Promise<{ file: AWS.S3.Body }> {
return {
file: await this.musicService.getEncodedChunkFiles(music_id, fileName),
};
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

갑자기 타입스크립트가 나와서 당황햣다..😵‍💫

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

나는 풀스택이니까 ~~

Copy link
Member

@youlalala youlalala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id 컨벤션만 확인해주시고 머지하면 될 것 같네용~ 고생하셨슴당 😀

Copy link
Collaborator

@2taezeat 2taezeat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다~

private val _events = MutableSharedFlow<MyMusicsEvent>()
val events: SharedFlow<MyMusicsEvent> = _events.asSharedFlow()

private val exceptionHandler = CoroutineExceptionHandler { _, throwable ->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    private val exceptionHandler = CoroutineExceptionHandler { _, throwable ->
        val errorType =
            if (throwable is CtException) throwable.ctError
            else CtErrorType.UN_KNOWN

        viewModelScope.launch { _events.emit(PlaylistsEvent.ShowMessage(errorType)) }
    }

emit 할때만, viewModelScope 이용하면 어떨까요?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

            val errorType =
                if (throwable is CtException) throwable.ctError
                else CtErrorType.UN_KNOWN

errorType이 viewModelScope.launch 안에 있는데, 이걸 viewModelScope.launch 바깥으로 빼자는 의미입니다~

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

일단 고치긴 했는데 이유는 무엇인가요?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코루틴 안에서 할 필요가 없는 일을, 굳이 코루틴 안에서 하는게 이상하다는 것 이였습니다~

@@ -3,6 +3,7 @@ export enum HTTP_STATUS_CODE {
'NOT_DUPLICATED_NICKNAME' = 200,
'DUPLICATED_NICKNAME' = 409,
'WRONG_TOKEN' = 401,
'NOT_FOUND' = 404,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'NOT_FOUND' = 404'

요거 어느 api 호출하고, 예외 상황일때 발생하나용? (노션 에서 찾을 수 없어서)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거는 제 코드가 아닌데 잘못 들어간...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 ㅋㅋㅋ 헷갈렸네요

@@ -8,10 +8,18 @@
<fragment
android:id="@+id/my_page_fragment"
android:name="com.ohdodok.catchytape.feature.mypage.MyPageFragment"
android:label="mypage"
android:label="my page"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

마이너 한데,
my_page 는 어떠신가요? (my_musics 도 마찬가지 입니다~)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

label은 사용하는 용도가 아니라 Preview에서 읽는 용도인데, my_page보다 my page가 가독성 좋지 않을까?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

가독성은 비슷할것 같네요, snack_case를 예외 없이 사용하자~ 라는 의미였습니다~

Comment on lines +57 to +59
init {
fetchMyMusics()
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

왜 init { } 에서 호출하는지, 알 수 있나요?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MyPage는 onStart 시점에 호출하도록 변경했어
여기는 이 위치가 맞는 거 같은데 코멘트를 단 이유가 궁금해

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제가 MyMusicsViewModel.kt 에서 호출 되는지 착각 했네요,
MyPageViewModel.kt 에서 init { fetchMyMusics() } 하는 줄 착각해서 코멘트 달았습니다~

이 위치 맞습니다~

@HamBP HamBP merged commit d869453 into develop Nov 29, 2023
1 check passed
@HamBP HamBP deleted the android/feature/61 branch November 30, 2023 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 android android ✨ feat 기능 개발
Projects
None yet
Development

Successfully merging this pull request may close these issues.

내가 업로드한 노래 전체보기
4 participants