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

[feature/#835] 🚌 알림 화면 리팩토링 #837

Merged
merged 31 commits into from
Sep 18, 2024
Merged

Conversation

l2hyunwoo
Copy link
Member

@l2hyunwoo l2hyunwoo commented Sep 8, 2024

Issue

What is this issue?

  • 알림 모듈들 domain, data 모듈로 빼버리기
  • 화면 Compose로 마이그레이션
  • FirebaseMessagingService를 LifecycleAwareFirebaseMessagingService 붙이기

@l2hyunwoo l2hyunwoo self-assigned this Sep 8, 2024
@l2hyunwoo l2hyunwoo requested a review from a team as a code owner September 8, 2024 02:15
Copy link

height bot commented Sep 8, 2024

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

Comment on lines +35 to +37
internal val navigator by lazy {
EntryPointAccessors.fromApplication(appContext, NavigatorEntryPoint::class.java).navigatorProvider()
}
Copy link
Member Author

Choose a reason for hiding this comment

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

유용한 팁

navigator를 일반 변수로 사용하기 위해서 EntryPoint를 활용하여 가져오고 있습니다. 힐트 모듈에 저장되어있는 값들은 EntryPoint 활용하면 그냥 꺼내서 쓸 수 있습니다.

concern point

  • SingletonModule에서 꺼내오기 때문에 applicationContext를 활용해야합니다. 이때 applicationContext를 별도의 주입과정필요 없이 가져오려고 하기 때문에 appContext 변수로 만들어서 가져옵니다.
  • 애초에 applicationContext는 전역 싱글톤이기 때문에 이렇게 가져와도 큰 문제점은 없다고 판단됩니다.

Copy link
Contributor

Choose a reason for hiding this comment

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

APP 클래스의 context를 가져오지 않는 이유는 App객체 생성 비용을 줄이기 위함이고, 힐트를 사용하지 않는 이유는 탐색 및 주입 과정을 거치지 않기 위해서 인가요?

Copy link
Member Author

Choose a reason for hiding this comment

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

@s9hn

  • 저 모듈에서 App 클래스 참조하면 순환참조 발생합니다.
  • 저 거대한 로직을 클래스 형태로 분리해서 주입받을 시간보다 service locator 형태로 일단 돌아갈 수 있게 코드를 개편해서 정리하는게 더 빨리 문제를 해결할 수 있겠다는 판단입니다. 그런데 반드시 수정되어야 하는 로직이에요.

Copy link
Contributor

Choose a reason for hiding this comment

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

아하 모듈이 달랏군요 b

Copy link
Member

@chattymin chattymin left a comment

Choose a reason for hiding this comment

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

어우 손 빠르시네요
고생하셨슴담

근데 언제 또 버전올리셨대요... 8.5라 실행안돼서 당황하다 업뎃 햇네요 ㅋㅋㅋ

Comment on lines +93 to +94
SoptTheme {
Scaffold(modifier = Modifier
Copy link
Member

Choose a reason for hiding this comment

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

저는 Activity에는 Composable을 이용한 화면을 놔두기 보다는 따로 추출하는 편인데 같이 쓰신 이유가 있을까요??
Activity에서는 각종 처리들을 하고, Screen과 같은 Composable을 통한 View로서 분리해두는게 가독성이 좋고 나중에 추적하기가 편하다 생각해서 저는 그렇게 하는 편입니당

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

@leeeyubin leeeyubin left a comment

Choose a reason for hiding this comment

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

속도가 엄청 빠르시군여.. 역시 최고입니다!! 수고하셨어요!!!!!

Copy link
Contributor

@s9hn s9hn left a comment

Choose a reason for hiding this comment

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

2천줄 그래도 다 봤읍니다 .. 고생티비
개인적으로 ,, 저는 가독성 충이라 가능한 분리하긴해요 코드만 보고도 어떤 화면 구성인지 알 수 있었음해서.. 물론 재사용성도 고려하고
이건 모 스타일 차이인듯

private val args by serializableExtra(StartArgs("", ""))
@Inject
lateinit var dataStore: SoptDataStore
private val args by serializableExtra(Argument("", ""))
Copy link
Contributor

@s9hn s9hn Sep 9, 2024

Choose a reason for hiding this comment

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

args 사용 부분을 봐야 무슨 상태값인지 이해가 가네요 좀 더 구체적인 네이밍도 좋겠어요 :)

Copy link
Member Author

Choose a reason for hiding this comment

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

navigation argument여서 이렇게 지은 것이긴 해요 그리고 이 args내의 변수가 어떤의미인지 나타내기때문에 args 변수 네이밍이 그렇게 나쁜 것 같지 않아요

Copy link
Contributor

Choose a reason for hiding this comment

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

이현우 요원님 조영호 선생님께서 찾으십니다

Comment on lines +35 to +37
internal val navigator by lazy {
EntryPointAccessors.fromApplication(appContext, NavigatorEntryPoint::class.java).navigatorProvider()
}
Copy link
Contributor

Choose a reason for hiding this comment

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

APP 클래스의 context를 가져오지 않는 이유는 App객체 생성 비용을 줄이기 위함이고, 힐트를 사용하지 않는 이유는 탐색 및 주입 과정을 거치지 않기 위해서 인가요?

navigationIcon = {
IconButton(onClick = { onBackPressedDispatcher.onBackPressed() }) {
Icon(
Icons.AutoMirrored.Filled.ArrowBack,
Copy link
Contributor

Choose a reason for hiding this comment

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

이 친구만 named call argument 없서요

Copy link
Contributor

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.

(귀찮음 이슈) 빨리빨리 해버릇한게 다 들통나버린 느낌....제대로 붙이겠나이다

@l2hyunwoo l2hyunwoo force-pushed the feature/#835 branch 3 times, most recently from b2af65a to 07a511e Compare September 14, 2024 03:53
@l2hyunwoo l2hyunwoo merged commit 81d1b52 into develop Sep 18, 2024
1 check passed
@l2hyunwoo l2hyunwoo deleted the feature/#835 branch September 18, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Refactor] 알림 화면 Compose로 리팩토링
4 participants