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: App focuses back on composer even if RHN is open on copy link from app download link in about settings #29254

Merged
merged 2 commits into from
Oct 12, 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
Next Next commit
fix: 28926
dukenv0307 committed Oct 5, 2023

Verified

This commit was signed with the committer’s verified signature.
sandhose Quentin Gliech
commit 67031629d737ac5fbf5b7561e21f98ce285993d8
6 changes: 6 additions & 0 deletions src/libs/ReportActionComposeFocusManager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';
import {TextInput} from 'react-native';
import ROUTES from '../ROUTES';
import Navigation from './Navigation/Navigation';

type FocusCallback = () => void;

@@ -28,6 +30,10 @@ function onComposerFocus(callback: FocusCallback, isMainComposer = false) {
* Request focus on the ReportActionComposer
*/
function focus() {
if (!Navigation.isActiveRoute(ROUTES.REPORT_WITH_ID.getRoute(Navigation.getTopmostReportId() ?? ''))) {
Copy link
Member

@rushatgabhane rushatgabhane Jul 26, 2024

Choose a reason for hiding this comment

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

Coming from #44078
This works for report but not when reportAction is also in the URL

return;
}

if (typeof focusCallback !== 'function') {
if (typeof mainComposerFocusCallback !== 'function') {
return;