Skip to content

Commit

Permalink
Fix Saved comments footer empty space doesn't open post (#1472)
Browse files Browse the repository at this point in the history
  • Loading branch information
MV-GH authored Apr 9, 2024
1 parent f5436d7 commit 421a496
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
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

0 comments on commit 421a496

Please sign in to comment.