-
Notifications
You must be signed in to change notification settings - Fork 2
[Feature] 콜밴팟 알림 구현 #1409
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
base: develop
Are you sure you want to change the base?
[Feature] 콜밴팟 알림 구현 #1409
Changes from all commits
42f65a9
6db1b76
5446684
3bfad38
786b53d
5c779bb
70f3f78
5d8626c
4a2adab
d8f17bb
b2298ab
9c5c069
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,6 +36,6 @@ interface Navigator { | |
|
|
||
| fun navigateToGroupChat( | ||
| context: Context, | ||
| postId: Int | ||
| extraPostId: Int | ||
| ): Intent | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -8,12 +8,14 @@ import androidx.compose.foundation.background | |||||||||||||||||||||||||||||
| import androidx.compose.foundation.layout.consumeWindowInsets | ||||||||||||||||||||||||||||||
| import androidx.compose.foundation.layout.padding | ||||||||||||||||||||||||||||||
| import androidx.compose.material3.Scaffold | ||||||||||||||||||||||||||||||
| import androidx.compose.runtime.LaunchedEffect | ||||||||||||||||||||||||||||||
| import androidx.compose.ui.Modifier | ||||||||||||||||||||||||||||||
| import androidx.navigation.compose.NavHost | ||||||||||||||||||||||||||||||
| import androidx.navigation.compose.rememberNavController | ||||||||||||||||||||||||||||||
| import dagger.hilt.android.AndroidEntryPoint | ||||||||||||||||||||||||||||||
| import `in`.koreatech.koin.core.designsystem.theme.RebrandKoinTheme | ||||||||||||||||||||||||||||||
| import `in`.koreatech.koin.core.designsystem.util.enableEdgeToEdgeWithLightStatusBar | ||||||||||||||||||||||||||||||
| import `in`.koreatech.koin.core.navigation.utils.EXTRA_ID | ||||||||||||||||||||||||||||||
| import `in`.koreatech.koin.feature.callvan.navigation.CallvanNavType | ||||||||||||||||||||||||||||||
| import `in`.koreatech.koin.feature.callvan.navigation.koinCallvanGraph | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
|
@@ -36,6 +38,15 @@ class CallvanActivity : ComponentActivity() { | |||||||||||||||||||||||||||||
| RebrandKoinTheme { | ||||||||||||||||||||||||||||||
| val navController = rememberNavController() | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| val targetId = intent.getIntExtra(EXTRA_ID, -1) | ||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Minor]
Suggested change
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| // Scheme url from backend is not matching with deeplink url in navigation | ||||||||||||||||||||||||||||||
| // So, let's navigate to correct deeplink from here | ||||||||||||||||||||||||||||||
|
kongwoojin marked this conversation as resolved.
|
||||||||||||||||||||||||||||||
| LaunchedEffect(Unit) { | ||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Minor]
현재 구조에서
Suggested change
|
||||||||||||||||||||||||||||||
| if (targetId == -1) return@LaunchedEffect | ||||||||||||||||||||||||||||||
| navController.navigate(CallvanNavType.CallvanDetail(targetId)) | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
Comment on lines
+45
to
+48
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Major] 화면 회전 시 중복 네비게이션 버그
또한, 이 코드에는 더 우아한 기존 패턴이 존재합니다. 권장 수정 방법:
Suggested change
또는 기존 |
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| Scaffold { innerPadding -> | ||||||||||||||||||||||||||||||
| NavHost( | ||||||||||||||||||||||||||||||
| modifier = Modifier | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,6 +5,7 @@ import androidx.lifecycle.SavedStateHandle | |||||||||||||||
| import androidx.lifecycle.ViewModel | ||||||||||||||||
| import androidx.lifecycle.viewModelScope | ||||||||||||||||
| import dagger.hilt.android.lifecycle.HiltViewModel | ||||||||||||||||
| import `in`.koreatech.koin.core.navigation.utils.EXTRA_POST_ID | ||||||||||||||||
| import `in`.koreatech.koin.domain.model.callvan.CallvanChatMessage.CallvanMessage | ||||||||||||||||
| import `in`.koreatech.koin.domain.model.upload.PreSignedUrlDomain | ||||||||||||||||
| import `in`.koreatech.koin.domain.usecase.callvan.GetCallvanChatMessagesUseCase | ||||||||||||||||
|
|
@@ -42,7 +43,7 @@ class GroupChatViewModel @Inject constructor( | |||||||||||||||
| ) : ViewModel(), ContainerHost<GroupChatState, GroupChatSideEffect> { | ||||||||||||||||
|
|
||||||||||||||||
| override val container = container<GroupChatState, GroupChatSideEffect>(GroupChatState()) { | ||||||||||||||||
|
kongwoojin marked this conversation as resolved.
|
||||||||||||||||
| val postId: Int? = savedStateHandle[POST_ID] | ||||||||||||||||
| val postId: Int? = savedStateHandle[EXTRA_POST_ID] | ||||||||||||||||
| checkNotNull(postId) | ||||||||||||||||
|
Comment on lines
+46
to
47
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Major]
Suggested change
혹은 |
||||||||||||||||
| getCallvanPostDetail(postId) | ||||||||||||||||
| } | ||||||||||||||||
|
|
@@ -226,7 +227,6 @@ class GroupChatViewModel @Inject constructor( | |||||||||||||||
| companion object { | ||||||||||||||||
| const val MAX_USER_COLORS = 8 | ||||||||||||||||
| const val POLLING_INTERVAL_MS = 1000L | ||||||||||||||||
| const val POST_ID = "post_id" | ||||||||||||||||
| } | ||||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| package `in`.koreatech.koin.navigation | ||
|
|
||
| import `in`.koreatech.koin.feature.article.ArticleActivity | ||
| import `in`.koreatech.koin.feature.callvan.CallvanActivity | ||
| import `in`.koreatech.koin.feature.chat.ui.groupchat.GroupChatActivity | ||
| import `in`.koreatech.koin.feature.chat.ui.room.ChatRoomActivity | ||
| import `in`.koreatech.koin.feature.club.ui.ClubActivity | ||
| import `in`.koreatech.koin.feature.dining.ui.DiningActivity | ||
|
|
@@ -17,8 +19,10 @@ enum class SchemeType( | |
| CHAT("chat", ChatRoomActivity::class.java), | ||
| CLUB_RECRUIT("club-recruitment", ClubActivity::class.java), | ||
| CLUB("club", ClubActivity::class.java), | ||
|
|
||
| LOST_AND_FOUND("articles/lost-item", LostAndFoundActivity::class.java); | ||
| LOST_AND_FOUND("articles/lost-item", LostAndFoundActivity::class.java), | ||
|
kongwoojin marked this conversation as resolved.
|
||
| CALLVAN("callvan", CallvanActivity::class.java), | ||
| CALLVAN_CHAT("callvan-chat", GroupChatActivity::class.java) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Trivial]
중장기적으로는 |
||
| ; | ||
|
kongwoojin marked this conversation as resolved.
|
||
|
|
||
| companion object { | ||
| fun fromType(type: String?): SchemeType? { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.