-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e4aec30
commit bdca815
Showing
14 changed files
with
537 additions
and
471 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
176 changes: 0 additions & 176 deletions
176
app/src/main/java/com/wafflestudio/snutt2/views/logged_in/bookmark/BookmarkPage.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/search/BookmarkList.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package com.wafflestudio.snutt2.views.logged_in.home.search | ||
|
||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.foundation.lazy.LazyColumn | ||
import androidx.compose.foundation.lazy.items | ||
import androidx.compose.foundation.lazy.rememberLazyListState | ||
import androidx.compose.material.Divider | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.collectAsState | ||
import androidx.compose.runtime.getValue | ||
import androidx.compose.ui.Modifier | ||
import com.wafflestudio.snutt2.lib.android.webview.WebViewContainer | ||
import com.wafflestudio.snutt2.ui.SNUTTColors | ||
import com.wafflestudio.snutt2.views.logged_in.home.TableListViewModel | ||
import com.wafflestudio.snutt2.views.logged_in.home.settings.UserViewModel | ||
import com.wafflestudio.snutt2.views.logged_in.home.timetable.TimetableViewModel | ||
import com.wafflestudio.snutt2.views.logged_in.lecture_detail.LectureDetailViewModel | ||
import com.wafflestudio.snutt2.views.logged_in.vacancy_noti.VacancyViewModel | ||
|
||
@Composable | ||
fun BookmarkList( | ||
searchViewModel: SearchViewModel, | ||
timetableViewModel: TimetableViewModel, | ||
tableListViewModel: TableListViewModel, | ||
lectureDetailViewModel: LectureDetailViewModel, | ||
userViewModel: UserViewModel, | ||
vacancyViewModel: VacancyViewModel, | ||
reviewWebViewContainer: WebViewContainer, | ||
) { | ||
val bookmarks by searchViewModel.bookmarkList.collectAsState() | ||
if (bookmarks.isEmpty()) { | ||
BookmarkPlaceHolder() | ||
} else { | ||
LazyColumn( | ||
state = rememberLazyListState(), | ||
modifier = Modifier | ||
.fillMaxSize(), | ||
) { | ||
items(bookmarks) { | ||
LectureListItem( | ||
lectureDataWithState = it, | ||
searchViewModel = searchViewModel, | ||
reviewWebViewContainer = reviewWebViewContainer, | ||
isBookmarkPage = true, | ||
timetableViewModel = timetableViewModel, | ||
tableListViewModel = tableListViewModel, | ||
lectureDetailViewModel = lectureDetailViewModel, | ||
userViewModel = userViewModel, | ||
vacancyViewModel = vacancyViewModel, | ||
) | ||
} | ||
item { Divider(color = SNUTTColors.White400) } | ||
} | ||
} | ||
} |
Oops, something went wrong.