Skip to content

#107 chatting#134

Open
kimgaheeme wants to merge 5 commits intodevelopmentfrom
#107-chatting
Open

#107 chatting#134
kimgaheeme wants to merge 5 commits intodevelopmentfrom
#107-chatting

Conversation

@kimgaheeme
Copy link
Member

@kimgaheeme kimgaheeme commented Nov 28, 2022

์ฃผ์š”๋‚ด์šฉ

  • UserId๋ฅผ ์ด์šฉํ•˜์—ฌ ์ฑ„ํŒ…์„ ๋ถˆ๋Ÿฌ์˜ค๊ณ  ์ฑ„ํŒ… ์‚ฌ์šฉํ•˜๋„๋ก ๋ณ€๊ฒฝ
  • ๋ฉ”์„ธ์ง€ ์ž‘์„ฑ์ž์˜ ๋‹‰๋„ค์ž„์„ ๋ณผ ์ˆ˜ ์žˆ๋„๋ก ์ˆ˜์ •
  • ์ƒ๋Œ€๋ฐฉ ํ”„๋กœํ•„์„ ํด๋ฆญํ•˜๋ฉด ๋ณผ ์ˆ˜ ์žˆ๋„๋ก ์ˆ˜์ •

userId๋ฅผ ์ด์šฉํ•˜์—ฌ ์ฑ„ํŒ…์ฐฝ์„ ๋ถˆ๋Ÿฌ์˜ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
๋ฉ”์„ธ์ง€๋ฅผ ๋ณด๋‚ธ ์‚ฌ๋žŒ์„ nickname ์œผ๋กœ ๋ณด์—ฌ์คŒ
์ฑ„ํŒ…์—์„œ ์ƒ๋Œ€๋ฐฉ ํ”„๋กœํ•„์„ ๋ˆŒ๋ €์„๋•Œ BottomSheet User Info ๋‚˜ํƒ€๋‚˜๋„๋กํ•˜์˜€์Œ
upPress: () -> Unit = {},
viewModel: ChattingDetailViewModel = hiltViewModel()
viewModel: ChattingDetailViewModel = hiltViewModel(),
userFeedViewModel: UserFeedViewModel = hiltViewModel(),
Copy link
Member

Choose a reason for hiding this comment

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

viewModel์ด ์—ฌ๋Ÿฌ๊ฐœ ์ฃผ์ž…๋œ๋‹ค๋ฉด ์ด๋ฆ„์„ chattingDetailViewModel๊ณผ ๊ฐ™์ด ๊ตฌ๋ถ„ํ•˜๋Š”๊ฒŒ ๋” ์ข‹์„๊ฒƒ ๊ฐ™์•„์š”!

Copy link
Member

@Kick-snare Kick-snare left a comment

Choose a reason for hiding this comment

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

๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค. ์ œ๊ฐ€ ํ™•์ธํ•œ ๊ฐœ์„ ์‚ฌํ•ญ์€ ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

image

  • ํ‚ค๋ณด๋“œ์— ์ž…๋ ฅ์นธ์ด ์•ฝ๊ฐ„ ์ž˜๋ฆฌ๋Š” ํ˜„์ƒ์„ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค.

image

  • chatting title? ์ด ๋‚˜ํƒ€๋‚˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
  • ์ด๋ฏธ์ง€๊ฐ€ ๋ฆฌ๋ทฐ ๋ชจ์ง‘๊ธ€์˜ ๊ฒƒ๊ณผ ์—ฐ๋™๋˜์•ผ ํ•ฉ๋‹ˆ๋‹ค.

image

  • ์ž๋™๋กœ๊ทธ์ธ ์‹œ userId๋ฅผ ๋น„๋กฏํ•œ ์ •๋ณด๋“ค์ด ์ฑ„์›Œ์ง€์ง€์•Š์•„ defalut์ธ userId 0์„ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค. #138

private val firebaseDatabase = FirebaseDatabase.getInstance()
private val databaseReference = firebaseDatabase.reference

var chatList : MutableList<Pair<Long,Chat>> = mutableStateListOf()
Copy link
Member

Choose a reason for hiding this comment

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

Pair<Long, Chat> ๊ณผ ๊ฐ™์ด ์ €์žฅํ•˜๋‹ˆ readabillty๊ฐ€ ๋–จ์–ด์ง€๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. model์„ ๋งŒ๋“œ๋Š”๊ฑด ์–ด๋–จ๊นŒ์š”?

@@ -81,7 +81,12 @@ fun NavGraphBuilder.divideGraph(
) { backStackEntry ->
val arguments = requireNotNull(backStackEntry.arguments)
val chattingId = arguments.getInt(DetailDestinationKey.CHATTING)
Copy link
Member

Choose a reason for hiding this comment

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

composable(
        "${Screen.RecruitingDetailScreen.route}/{${DetailDestinationKey.RECRUITING}}",
        arguments = listOf(navArgument(DetailDestinationKey.RECRUITING) { type = NavType.LongType })
    ) { backStackEntry ->
        val arguments = requireNotNull(backStackEntry.arguments)
        val recruitingId = arguments.getInt(DetailDestinationKey.RECRUITING)
        RecruitingDetailScreen(
            postId = recruitingId,
            upPress = upPress,
            navController = navController,
            onChattingSelected = {id -> onChattingClick(id, backStackEntry)}
        )
    }
Key recruitingId expected Integer but value was a java.lang.Long.  
The default value 0 was returned.
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer

type ๋ฌธ์ œ๊ฐ€ ์กด์žฌํ•˜๋Š”๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants