Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Saved comments footer empty space doesn't open post #1472

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions app/src/main/java/com/jerboa/model/SiteViewModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -121,29 +121,23 @@ class SiteViewModel(private val accountRepository: AccountRepository) : ViewMode

fun fetchUnreadCounts() {
viewModelScope.launch {
viewModelScope.launch {
unreadCountRes = ApiState.Loading
unreadCountRes = API.getInstance().getUnreadCount().toApiState()
}
unreadCountRes = ApiState.Loading
unreadCountRes = API.getInstance().getUnreadCount().toApiState()
}
}

fun fetchUnreadAppCount() {
viewModelScope.launch {
viewModelScope.launch {
unreadAppCountRes = ApiState.Loading
unreadAppCountRes =
API.getInstance().getUnreadRegistrationApplicationCount().toApiState()
}
unreadAppCountRes = ApiState.Loading
unreadAppCountRes =
API.getInstance().getUnreadRegistrationApplicationCount().toApiState()
}
}

fun fetchUnreadReportCount() {
viewModelScope.launch {
viewModelScope.launch {
unreadReportCountRes = ApiState.Loading
unreadReportCountRes = API.getInstance().getReportCount(GetReportCount()).toApiState()
}
unreadReportCountRes = ApiState.Loading
unreadReportCountRes = API.getInstance().getReportCount(GetReportCount()).toApiState()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,14 @@ fun LazyListScope.commentNodeItem(
onPersonClick = onPersonClick,
onViewVotesClick = onViewVotesClick,
onBlockCreatorClick = onBlockCreatorClick,
onClick = {
toggleExpanded(commentId)
onClick = if (isFlat) {
{
onCommentClick(commentView)
}
} else {
{
toggleExpanded(commentId)
}
},
onLongClick = {
toggleActionBar(commentId)
Expand Down