Files
buzz/mobile/lib/features/channels/thread_detail_page/tail_alignment.dart
klopez4212 69107dc3bf Polish mobile message threads and composer (#5645)
## Summary

- refine mobile message metadata, search spacing, and Activity filter
semantics
- add channel-parity Latest navigation and stable tail following to
threads
- synchronize Android composer/keyboard geometry and keep Latest spacing
stable across IME transitions

## Validation

- `bin/just mobile-check`
- `bin/just mobile-test` (1,276 tests)
- Pixel 10 install/launch and channel/thread keyboard, Latest, tail, and
back-navigation review
- signed iPhone install/launch workflow

## Snapshots

See the review snapshots below.

---------

Signed-off-by: kenny lopez <klopez4212@gmail.com>
Signed-off-by: Kenny Lopez <klopez4212@gmail.com>
Signed-off-by: Princess Donut <b238ea756dee4d98afa5883fc7f1de61eeabe65bf700e3a5a5a80db5e42e2c2b@buzz.block.builderlab.xyz>
Co-authored-by: Fast Fizz <2df81cb51f05a9d5387ef24d7b9ecb8fcdfcd1c70ffabc67061c9596e1b5b1c4@buzz.block.builderlab.xyz>
Co-authored-by: Princess Donut <b238ea756dee4d98afa5883fc7f1de61eeabe65bf700e3a5a5a80db5e42e2c2b@buzz.block.builderlab.xyz>
2026-08-15 09:14:14 +01:00

18 lines
677 B
Dart

part of '../thread_detail_page.dart';
double _threadTailAlignmentForViewport({
required double fullHeight,
required double imeBottomInset,
required bool usesFixedImeViewport,
required double bottomInset,
}) {
// iOS resizes the Scaffold body around the keyboard and removes that inset
// from the body's MediaQuery. List alignment is relative to that smaller
// viewport, so using fullHeight leaves the final reply behind the composer.
final viewportHeight =
(fullHeight - (usesFixedImeViewport ? 0 : imeBottomInset))
.clamp(1.0, double.infinity)
.toDouble();
return (1 - bottomInset / viewportHeight).clamp(0.0, 1.0).toDouble();
}