🐛 Fix scroll auto scroll back

This commit is contained in:
LittleSheep 2024-06-02 14:45:19 +08:00
parent 665615ae70
commit 456bac67f2
2 changed files with 9 additions and 13 deletions

View File

@ -110,9 +110,10 @@ class _AttachmentItemState extends State<AttachmentItem> {
child: ActionChip(
visualDensity:
const VisualDensity(vertical: -4, horizontal: -4),
avatar: Icon(Icons.visibility_off,
color:
Theme.of(context).colorScheme.onSurfaceVariant),
avatar: Icon(
Icons.visibility_off,
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
label: Text('hide'.tr),
onPressed: () {
if (widget.onHide != null) widget.onHide!();

View File

@ -97,19 +97,14 @@ class _AttachmentListState extends State<AttachmentList> {
@override
Widget build(BuildContext context) {
if (widget.attachmentsId.isEmpty) {
return Container();
return const SizedBox();
}
if (_isLoading) {
return AspectRatio(
aspectRatio: _aspectRatio,
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surfaceContainerHigh),
child: const Center(
child: CircularProgressIndicator(),
),
),
return Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surfaceContainerHigh),
child: const LinearProgressIndicator(),
);
}