From 81afb21c146c6323c503093f072e5978d0342d8f Mon Sep 17 00:00:00 2001 From: Nguyen Quang Minh Date: Fri, 29 Nov 2024 23:05:57 +0700 Subject: [PATCH] =?UTF-8?q?refactor(class,=20folder):=20lo=E1=BA=A1i=20b?= =?UTF-8?q?=E1=BB=8F=20code=20khi=20truy=E1=BB=81n=20param?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/app/classes/create/CreateClassScreen.kt | 1 - .../quickmem/presentation/app/classes/detail/ClassDetailArgs.kt | 1 - .../presentation/app/classes/detail/ClassDetailScreen.kt | 1 - .../presentation/app/classes/detail/ClassDetailViewModel.kt | 2 -- .../presentation/app/deeplink/classes/JoinClassScreen.kt | 1 - .../presentation/app/deeplink/folder/LoadFolderScreen.kt | 1 - .../presentation/app/folder/create/CreateFolderScreen.kt | 1 - .../quickmem/presentation/app/folder/detail/FolderDetailArgs.kt | 1 - .../java/com/pwhs/quickmem/presentation/app/home/HomeScreen.kt | 2 -- .../com/pwhs/quickmem/presentation/app/library/LibraryScreen.kt | 2 -- .../presentation/app/search_result/SearchResultScreen.kt | 2 -- .../quickmem/presentation/app/user_detail/UserDetailScreen.kt | 2 -- 12 files changed, 17 deletions(-) diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/app/classes/create/CreateClassScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/app/classes/create/CreateClassScreen.kt index cae12f13..992a7650 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/app/classes/create/CreateClassScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/app/classes/create/CreateClassScreen.kt @@ -41,7 +41,6 @@ fun CreateClassScreen( navigator.navigateUp() navigator.navigate( ClassDetailScreenDestination( - code = "", id = event.id, title = uiState.title, description = uiState.description diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/app/classes/detail/ClassDetailArgs.kt b/app/src/main/java/com/pwhs/quickmem/presentation/app/classes/detail/ClassDetailArgs.kt index e7f758b5..920abe79 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/app/classes/detail/ClassDetailArgs.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/app/classes/detail/ClassDetailArgs.kt @@ -4,5 +4,4 @@ data class ClassDetailArgs( val title: String, val description: String, val id: String, - val code: String ) \ No newline at end of file diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/app/classes/detail/ClassDetailScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/app/classes/detail/ClassDetailScreen.kt index 35e54ee5..d972769a 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/app/classes/detail/ClassDetailScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/app/classes/detail/ClassDetailScreen.kt @@ -255,7 +255,6 @@ fun ClassDetailScreen( navigator.navigate( FolderDetailScreenDestination( id = it.id, - code = "" ) ) }, diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/app/classes/detail/ClassDetailViewModel.kt b/app/src/main/java/com/pwhs/quickmem/presentation/app/classes/detail/ClassDetailViewModel.kt index 92a2807c..ca392ddf 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/app/classes/detail/ClassDetailViewModel.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/app/classes/detail/ClassDetailViewModel.kt @@ -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"] ?: "" @@ -49,7 +48,6 @@ class ClassDetailViewModel @Inject constructor( _uiState.update { it.copy( isLogin = true, - joinClassCode = joinClassCode, id = id, title = title, description = description diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/app/deeplink/classes/JoinClassScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/app/deeplink/classes/JoinClassScreen.kt index 8bc77367..09703f19 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/app/deeplink/classes/JoinClassScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/app/deeplink/classes/JoinClassScreen.kt @@ -72,7 +72,6 @@ fun JoinClassScreen( navigator.navigate( ClassDetailScreenDestination( id = event.id, - code = event.classCode, title = event.title, description = event.description ) diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/app/deeplink/folder/LoadFolderScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/app/deeplink/folder/LoadFolderScreen.kt index 75d2f36c..e291781e 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/app/deeplink/folder/LoadFolderScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/app/deeplink/folder/LoadFolderScreen.kt @@ -35,7 +35,6 @@ fun LoadFolderScreen( navigator.navigate( FolderDetailScreenDestination( id = event.folderId, - code = uiState.folderCode, ) ) { popUpTo(NavGraphs.root) { diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/create/CreateFolderScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/create/CreateFolderScreen.kt index 82f7a78e..7a53f6f7 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/create/CreateFolderScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/create/CreateFolderScreen.kt @@ -47,7 +47,6 @@ fun CreateFolderScreen( navigator.navigate( FolderDetailScreenDestination( id = event.id, - code = "" ) ) } diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/detail/FolderDetailArgs.kt b/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/detail/FolderDetailArgs.kt index f3c69e3c..bedf614f 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/detail/FolderDetailArgs.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/app/folder/detail/FolderDetailArgs.kt @@ -2,5 +2,4 @@ package com.pwhs.quickmem.presentation.app.folder.detail data class FolderDetailArgs ( val id: String, - val code: String, ) \ No newline at end of file diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/app/home/HomeScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/app/home/HomeScreen.kt index 9ba2f384..e2547f13 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/app/home/HomeScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/app/home/HomeScreen.kt @@ -139,7 +139,6 @@ fun HomeScreen( navigator.navigate( ClassDetailScreenDestination( id = it.id, - code = it.joinToken ?: "", title = it.title, description = it.description ) @@ -149,7 +148,6 @@ fun HomeScreen( navigator.navigate( FolderDetailScreenDestination( id = it.id, - code = "" ) ) }, diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/app/library/LibraryScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/app/library/LibraryScreen.kt index 6317715e..8f6546c5 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/app/library/LibraryScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/app/library/LibraryScreen.kt @@ -146,7 +146,6 @@ fun LibraryScreen( navigator.navigate( ClassDetailScreenDestination( id = it.id, - code = it.joinToken ?: "", title = it.title, description = it.description ) @@ -156,7 +155,6 @@ fun LibraryScreen( navigator.navigate( FolderDetailScreenDestination( id = it.id, - code = "" ) ) }, diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/app/search_result/SearchResultScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/app/search_result/SearchResultScreen.kt index f5ad4ebb..379ac803 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/app/search_result/SearchResultScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/app/search_result/SearchResultScreen.kt @@ -144,7 +144,6 @@ fun SearchResultScreen( navigator.navigate( ClassDetailScreenDestination( id = it?.id ?: "", - code = it?.joinToken ?: "", title = it?.title ?: "", description = it?.description ?: "" ) @@ -154,7 +153,6 @@ fun SearchResultScreen( navigator.navigate( FolderDetailScreenDestination( id = it?.id ?: "", - code = "" ) ) }, diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/app/user_detail/UserDetailScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/app/user_detail/UserDetailScreen.kt index 631d3fca..f5e69992 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/app/user_detail/UserDetailScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/app/user_detail/UserDetailScreen.kt @@ -147,7 +147,6 @@ fun UserDetailScreen( id = it.id, description = it.description, title = it.title, - code = "" ) ) }, @@ -162,7 +161,6 @@ fun UserDetailScreen( navigator.navigate( FolderDetailScreenDestination( id = it.id, - code = "" ) ) },