From b21c960affa4fe3524d59ff84ef1b40210441874 Mon Sep 17 00:00:00 2001 From: Hritik Kumar Singh Date: Sun, 16 Oct 2022 15:14:52 +0530 Subject: [PATCH] Resolved merge conflicts --- .../com/hadiyarajesh/notex/ui/folders/NoteFolderScreen.kt | 2 +- .../hadiyarajesh/notex/ui/folders/NoteFolderViewModel.kt | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/hadiyarajesh/notex/ui/folders/NoteFolderScreen.kt b/app/src/main/java/com/hadiyarajesh/notex/ui/folders/NoteFolderScreen.kt index 3434eef..f859476 100644 --- a/app/src/main/java/com/hadiyarajesh/notex/ui/folders/NoteFolderScreen.kt +++ b/app/src/main/java/com/hadiyarajesh/notex/ui/folders/NoteFolderScreen.kt @@ -41,7 +41,7 @@ fun NoteFolderScreen( ) { val scope = rememberCoroutineScope() val context = LocalContext.current - val folders = remember { folderViewModel.getFolders(NoteFolder) }.collectAsLazyPagingItems() + val folders = remember { folderViewModel.getFolders() }.collectAsLazyPagingItems() val data = listOf( Folder( diff --git a/app/src/main/java/com/hadiyarajesh/notex/ui/folders/NoteFolderViewModel.kt b/app/src/main/java/com/hadiyarajesh/notex/ui/folders/NoteFolderViewModel.kt index 9eb353c..71b5c28 100644 --- a/app/src/main/java/com/hadiyarajesh/notex/ui/folders/NoteFolderViewModel.kt +++ b/app/src/main/java/com/hadiyarajesh/notex/ui/folders/NoteFolderViewModel.kt @@ -28,9 +28,7 @@ class NoteFolderViewModel @Inject constructor( ) } - fun getFolders( - folderType: FolderType - ): Flow> { - return folderRepository.getAllFolders(folderType).cachedIn(viewModelScope) + fun getFolders(): Flow> { + return folderRepository.getAllNoteFolders().cachedIn(viewModelScope) } } \ No newline at end of file