Skip to content

Commit

Permalink
Merge pull request #711 from micahmo/fix/sort-icon-fab
Browse files Browse the repository at this point in the history
Fix sort icon for primary FAB action
  • Loading branch information
hjiangsu authored Sep 7, 2023
2 parents 6b618b2 + 05a9c1b commit 786314a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions lib/community/pages/community_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,7 @@ class _CommunityPageState extends State<CommunityPage> with AutomaticKeepAliveCl
? GestureFab(
distance: 60,
icon: Icon(
singlePressAction.isAllowed(state: state, widget: widget)
? singlePressAction.getIcon(override: singlePressAction == FeedFabAction.changeSort ? sortTypeIcon : null)
: FeedFabAction.dismissRead.getIcon(),
singlePressAction.isAllowed(state: state, widget: widget) ? singlePressAction.getIcon() : FeedFabAction.dismissRead.getIcon(),
semanticLabel: singlePressAction.isAllowed(state: state) ? singlePressAction.getTitle(context) : FeedFabAction.dismissRead.getTitle(context),
size: 35,
),
Expand Down
2 changes: 1 addition & 1 deletion lib/post/pages/post_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class _PostPageState extends State<PostPage> {
centered: combineNavAndFab,
distance: combineNavAndFab ? 45 : 60,
icon: Icon(
singlePressAction.getIcon(override: singlePressAction == PostFabAction.changeSort ? sortTypeIcon : null, postLocked: postLocked),
singlePressAction.getIcon(postLocked: postLocked),
semanticLabel: singlePressAction.getTitle(context, postLocked: postLocked),
size: 35,
),
Expand Down

0 comments on commit 786314a

Please sign in to comment.