-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Fix: different behavior when using app and device back button in selection mode #46937
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
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
c1afaca
fix back button in the selection mode
nkdengineer f617f88
Merge branch 'main' into fix/45896
nkdengineer 53ea108
remove useless code
nkdengineer 4555031
Merge branch 'main' into fix/45896
nkdengineer cb4ccdb
Merge branch 'main' into fix/45896
nkdengineer 097112c
Merge branch 'main' into fix/45896
nkdengineer 76efce7
merge main
nkdengineer 0a69dd9
resolve conflict
nkdengineer 4a6cac6
merge main
nkdengineer e7bc518
merge main
nkdengineer 3b91615
implement for mWeb
nkdengineer efb3993
Merge branch 'main' into fix/45896
nkdengineer 2c5187b
merge main
nkdengineer 093b579
merge main
nkdengineer 39dee67
fix conflict
nkdengineer ce2eb7d
Merge branch 'main' into fix/45896
nkdengineer 9201fd5
remove change on web
nkdengineer 952539c
merge main
nkdengineer 9d63337
Merge branch 'main' into fix/45896
nkdengineer 3e2e006
Merge branch 'main' into fix/45896
nkdengineer 76c3a61
fix lint
nkdengineer 7e11167
Merge branch 'main' into fix/45896
nkdengineer 0793384
Merge branch 'main' into fix/45896
nkdengineer ecdc785
Merge branch 'main' into fix/45896
nkdengineer 18cbbe9
fix lint
nkdengineer 3dfac09
update type
nkdengineer 9135bd0
fix typecheck
nkdengineer a6d2a1a
Merge branch 'main' into fix/45896
nkdengineer 4a708bf
Merge branch 'main' into fix/45896
nkdengineer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import {useEffect} from 'react'; | ||
import {BackHandler} from 'react-native'; | ||
import type UseHandleBackButtonCallback from './type'; | ||
|
||
export default function useHandleBackButton(callback: UseHandleBackButtonCallback) { | ||
nkdengineer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
useEffect(() => { | ||
const backHandler = BackHandler.addEventListener('hardwareBackPress', callback); | ||
|
||
return () => backHandler.remove(); | ||
}, [callback]); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import type UseHandleBackButtonCallback from './type'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
export default function useHandleBackButton(_callback: UseHandleBackButtonCallback) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
type UseHandleBackButtonCallback = () => boolean; | ||
|
||
export default UseHandleBackButtonCallback; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.