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

Fix issue with search from FAB #1308

Merged
merged 1 commit into from
Apr 16, 2024
Merged

Conversation

micahmo
Copy link
Member

@micahmo micahmo commented Apr 16, 2024

Pull Request Description

This PR fixes an issue where the comment search function could not be invoked if it were the primary (single press) FAB button.

Issue Being Fixed

Issue Number: See #1306 (comment)

Screenshots / Recordings

qemu-system-x86_64_THkK12BRvJ.mp4

Checklist

  • Did you update CHANGELOG.md?
  • Did you use localized strings where applicable?
  • Did you add semanticLabels where applicable for accessibility?

Copy link
Member

@hjiangsu hjiangsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

On a side note, I would like to eventually refactor our handling of override actions (it's getting a bit complicated 😅)

override: singlePressAction == PostFabAction.backToTop
? () => {
      _itemScrollController.scrollTo(
        index: 0,
        duration: const Duration(milliseconds: 500),
        curve: Curves.easeInOut,
      )
    }
: singlePressAction == PostFabAction.changeSort
    ? () => showSortBottomSheet(context, state)
    : singlePressAction == PostFabAction.replyToPost
        ? () => replyToPost(context, postLocked: postLocked)
        : singlePressAction == PostFabAction.search
            ? () => startCommentSearch(context)
            : null),

@hjiangsu hjiangsu merged commit 3e7f0b9 into thunder-app:develop Apr 16, 2024
1 check passed
@micahmo
Copy link
Member Author

micahmo commented Apr 17, 2024

I would like to eventually refactor our handling of override actions (it's getting a bit complicated 😅)

Totally agreed, that's exactly why this got missed.

@micahmo micahmo deleted the fix/search-fab branch April 17, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants