Skip to content

Commit

Permalink
refactor(class, folder): loại bỏ code khi truyền param
Browse files Browse the repository at this point in the history
  • Loading branch information
nqmgaming committed Nov 29, 2024
1 parent 6c1f633 commit 81afb21
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ fun CreateClassScreen(
navigator.navigateUp()
navigator.navigate(
ClassDetailScreenDestination(
code = "",
id = event.id,
title = uiState.title,
description = uiState.description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ data class ClassDetailArgs(
val title: String,
val description: String,
val id: String,
val code: String
)
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ fun ClassDetailScreen(
navigator.navigate(
FolderDetailScreenDestination(
id = it.id,
code = ""
)
)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class ClassDetailViewModel @Inject constructor(
val uiEvent = _uiEvent.receiveAsFlow()

init {
val joinClassCode: String = savedStateHandle["code"] ?: ""
val id: String = savedStateHandle["id"] ?: ""
val title: String = savedStateHandle["title"] ?: ""
val description: String = savedStateHandle["description"] ?: ""
Expand All @@ -49,7 +48,6 @@ class ClassDetailViewModel @Inject constructor(
_uiState.update {
it.copy(
isLogin = true,
joinClassCode = joinClassCode,
id = id,
title = title,
description = description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ fun JoinClassScreen(
navigator.navigate(
ClassDetailScreenDestination(
id = event.id,
code = event.classCode,
title = event.title,
description = event.description
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ fun LoadFolderScreen(
navigator.navigate(
FolderDetailScreenDestination(
id = event.folderId,
code = uiState.folderCode,
)
) {
popUpTo(NavGraphs.root) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ fun CreateFolderScreen(
navigator.navigate(
FolderDetailScreenDestination(
id = event.id,
code = ""
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ package com.pwhs.quickmem.presentation.app.folder.detail

data class FolderDetailArgs (
val id: String,
val code: String,
)
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ fun HomeScreen(
navigator.navigate(
ClassDetailScreenDestination(
id = it.id,
code = it.joinToken ?: "",
title = it.title,
description = it.description
)
Expand All @@ -149,7 +148,6 @@ fun HomeScreen(
navigator.navigate(
FolderDetailScreenDestination(
id = it.id,
code = ""
)
)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ fun LibraryScreen(
navigator.navigate(
ClassDetailScreenDestination(
id = it.id,
code = it.joinToken ?: "",
title = it.title,
description = it.description
)
Expand All @@ -156,7 +155,6 @@ fun LibraryScreen(
navigator.navigate(
FolderDetailScreenDestination(
id = it.id,
code = ""
)
)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ fun SearchResultScreen(
navigator.navigate(
ClassDetailScreenDestination(
id = it?.id ?: "",
code = it?.joinToken ?: "",
title = it?.title ?: "",
description = it?.description ?: ""
)
Expand All @@ -154,7 +153,6 @@ fun SearchResultScreen(
navigator.navigate(
FolderDetailScreenDestination(
id = it?.id ?: "",
code = ""
)
)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ fun UserDetailScreen(
id = it.id,
description = it.description,
title = it.title,
code = ""
)
)
},
Expand All @@ -162,7 +161,6 @@ fun UserDetailScreen(
navigator.navigate(
FolderDetailScreenDestination(
id = it.id,
code = ""
)
)
},
Expand Down

0 comments on commit 81afb21

Please sign in to comment.