Forum: answers to me as the only count, reply box in the branch, keyboard-safe inputs
- The "Követett" tab becomes "Válaszok": its count is the unread answers to the member (a reply to their post, a first-level reply in their thread, or a post naming them), listed on /forum/valaszok with "Mind olvasott"; the followed threads are its second view. The other counts are gone from the menu; listeners see the waiting threads on their card on the front page. - Replying to a post opens the box at the bottom of its branch and scrolls there; another branch moves it (with the text typed so far). - Phones: while typing, the forum's bottom menu and floating bars step aside and the box with its send button is scrolled above the keyboard (KeyboardSafe, site-wide; Android resizes the page for the keyboard). - The "Meghallgató" badge is now "Kísérő", with a new icon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -174,9 +174,20 @@ pub async fn home(state: St, viewer: Viewer) -> ApiResult<Json<Value>> {
|
||||
let people = super::authors(&state.db, present.iter().copied()).await?;
|
||||
let online: Vec<Value> = present.iter().filter_map(|id| people.get(id).cloned()).collect();
|
||||
|
||||
// Volunteer listeners: threads asking to be heard, still without a reply.
|
||||
let waiting = match &viewer.member {
|
||||
Some(m) if m.listener => Some(waiting_count(&state, &viewer).await?),
|
||||
_ => None,
|
||||
};
|
||||
let replies = match &viewer.member {
|
||||
Some(m) => Some(super::replies::unread_count(&state.db, &viewer, m.user_id).await?),
|
||||
None => None,
|
||||
};
|
||||
Ok(Json(json!({
|
||||
"viewer": viewer_json(&viewer),
|
||||
"followed": followed,
|
||||
"replies": replies,
|
||||
"waiting": waiting,
|
||||
"online": online,
|
||||
"topics": topics,
|
||||
"unanswered": cards_json(&state.db, unanswered).await?,
|
||||
@@ -234,17 +245,16 @@ pub async fn nav(state: St, viewer: Viewer) -> ApiResult<Json<Value>> {
|
||||
} else {
|
||||
None
|
||||
};
|
||||
// Volunteer listeners: threads asking to be heard, still without a reply.
|
||||
let waiting = match &viewer.member {
|
||||
Some(m) if m.listener => Some(waiting_count(&state, &viewer).await?),
|
||||
_ => None,
|
||||
// The only count on the forum tab: unread answers to the member.
|
||||
let replies = match &viewer.member {
|
||||
Some(m) => Some(super::replies::unread_count(&state.db, &viewer, m.user_id).await?),
|
||||
None => None,
|
||||
};
|
||||
Ok(Json(json!({
|
||||
"viewer": viewer_json(&viewer),
|
||||
"followed": followed_counts(&state, &viewer).await?,
|
||||
"replies": replies,
|
||||
"messages": messages,
|
||||
"reports": reports,
|
||||
"waiting": waiting,
|
||||
})))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user