Fix hiding of media bar on hidden posts...

This commit is contained in:
Hank Grabowski 2022-12-12 23:04:32 -05:00
parent 81f70cca08
commit d07bffc907

View file

@ -68,11 +68,22 @@ class _StatusControlState extends State<StatusControl> {
const VerticalPadding(
height: 5,
),
if (entry.spoilerText.isNotEmpty)
TextButton(
onPressed: () {
setState(() {
showContent = !showContent;
});
},
child: Text(
'Content Summary: ${entry.spoilerText} (Click to ${showContent ? "Hide" : "Show"}}')),
if (showContent) ...[
buildBody(context),
const VerticalPadding(
height: 5,
),
buildMediaBar(context),
],
const VerticalPadding(
height: 5,
),
@ -140,21 +151,7 @@ class _StatusControlState extends State<StatusControl> {
}
Widget buildBody(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (entry.spoilerText.isNotEmpty)
TextButton(
onPressed: () {
setState(() {
showContent = !showContent;
});
},
child: Text(
'Content Summary: ${entry.spoilerText} (Click to ${showContent ? "Hide" : "Show"}}')),
if (showContent)
HtmlWidget(
return HtmlWidget(
entry.body,
onTapUrl: (url) async {
return await openUrlStringInSystembrowser(context, url, 'video');
@ -162,8 +159,6 @@ class _StatusControlState extends State<StatusControl> {
onTapImage: (imageMetadata) {
print(imageMetadata);
},
),
],
);
}