mirror of
https://gitlab.com/mysocialportal/relatica
synced 2024-10-18 15:53:32 +00:00
Fix hiding of media bar on hidden posts...
This commit is contained in:
parent
81f70cca08
commit
d07bffc907
1 changed files with 24 additions and 29 deletions
|
@ -68,11 +68,22 @@ class _StatusControlState extends State<StatusControl> {
|
|||
const VerticalPadding(
|
||||
height: 5,
|
||||
),
|
||||
buildBody(context),
|
||||
const VerticalPadding(
|
||||
height: 5,
|
||||
),
|
||||
buildMediaBar(context),
|
||||
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,30 +151,14 @@ 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(
|
||||
entry.body,
|
||||
onTapUrl: (url) async {
|
||||
return await openUrlStringInSystembrowser(context, url, 'video');
|
||||
},
|
||||
onTapImage: (imageMetadata) {
|
||||
print(imageMetadata);
|
||||
},
|
||||
),
|
||||
],
|
||||
return HtmlWidget(
|
||||
entry.body,
|
||||
onTapUrl: (url) async {
|
||||
return await openUrlStringInSystembrowser(context, url, 'video');
|
||||
},
|
||||
onTapImage: (imageMetadata) {
|
||||
print(imageMetadata);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue