Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added option to collapse post body #888

Merged
merged 4 commits into from
Nov 21, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch '0.2.7' of github.com:thunder-app/thunder into feature/c…
…ollapse-post
  • Loading branch information
hjiangsu committed Nov 21, 2023
commit 5f6db697756c7ff897095a797e227aa546f42164
16 changes: 8 additions & 8 deletions lib/post/widgets/post_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ class _PostSubviewState extends State<PostSubview> with SingleTickerProviderStat
child: Row(
children: [
Expanded(
child: Text(
child: ScalableText(
HtmlUnescape().convert(post.name),
textScaleFactor: MediaQuery.of(context).textScaleFactor * thunderState.titleFontSizeScale.textScaleFactor,
fontScale: thunderState.titleFontSizeScale,
style: theme.textTheme.titleMedium,
),
),
Expand Down Expand Up @@ -169,9 +169,9 @@ class _PostSubviewState extends State<PostSubview> with SingleTickerProviderStat
padding: const EdgeInsets.only(left: 5, right: 5),
child: Row(
children: [
Text(
ScalableText(
postView.creator.displayName != null && widget.useDisplayNames ? postView.creator.displayName! : postView.creator.name,
textScaleFactor: MediaQuery.of(context).textScaleFactor * thunderState.metadataFontSizeScale.textScaleFactor,
fontScale: thunderState.metadataFontSizeScale,
style: theme.textTheme.bodyMedium?.copyWith(
color: (isSpecialUser(context, isOwnComment, post, null, postView.creator, widget.moderators) ? theme.colorScheme.onBackground : theme.textTheme.bodyMedium?.color)
?.withOpacity(0.75),
Expand Down Expand Up @@ -221,9 +221,9 @@ class _PostSubviewState extends State<PostSubview> with SingleTickerProviderStat
),
),
if (isSpecialUser(context, isOwnComment, post, null, postView.creator, widget.moderators)) const SizedBox(width: 8.0),
Text(
ScalableText(
'to',
textScaleFactor: MediaQuery.of(context).textScaleFactor * thunderState.metadataFontSizeScale.textScaleFactor,
fontScale: thunderState.metadataFontSizeScale,
style: theme.textTheme.bodyMedium?.copyWith(
color: theme.textTheme.bodyMedium?.color?.withOpacity(0.4),
),
Expand All @@ -239,9 +239,9 @@ class _PostSubviewState extends State<PostSubview> with SingleTickerProviderStat
preferBelow: false,
child: Padding(
padding: const EdgeInsets.only(left: 5, right: 5),
child: Text(
child: ScalableText(
postView.community.name,
textScaleFactor: MediaQuery.of(context).textScaleFactor * thunderState.metadataFontSizeScale.textScaleFactor,
fontScale: thunderState.metadataFontSizeScale,
style: theme.textTheme.bodyMedium?.copyWith(
color: theme.textTheme.bodyMedium?.color?.withOpacity(0.75),
),
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.