Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 0 additions & 4 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,6 @@ const ONYXKEYS = {
/** A map of the user's security group IDs they belong to in specific domains */
MY_DOMAIN_SECURITY_GROUPS: 'myDomainSecurityGroups',

/** Report ID of the last report the user viewed as anonymous user */
LAST_OPENED_PUBLIC_ROOM_ID: 'lastOpenedPublicRoomID',

// The theme setting set by the user in preferences.
// This can be either "light", "dark" or "system"
PREFERRED_THEME: 'nvp_preferredTheme',
Expand Down Expand Up @@ -1187,7 +1184,6 @@ type OnyxValuesMapping = {
[ONYXKEYS.IS_BETA]: boolean;
[ONYXKEYS.IS_CHECKING_PUBLIC_ROOM]: boolean;
[ONYXKEYS.MY_DOMAIN_SECURITY_GROUPS]: Record<string, string>;
[ONYXKEYS.LAST_OPENED_PUBLIC_ROOM_ID]: string;
[ONYXKEYS.VERIFY_3DS_SUBSCRIPTION]: string;
[ONYXKEYS.PREFERRED_THEME]: ValueOf<typeof CONST.THEME>;
[ONYXKEYS.MAPBOX_ACCESS_TOKEN]: OnyxTypes.MapboxAccessToken;
Expand Down
5 changes: 0 additions & 5 deletions src/libs/Navigation/AppNavigator/AuthScreens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ function AuthScreens() {
const [isDelegatorFromOldDotIsReady, setIsDelegatorFromOldDotIsReady] = useState(false);

const [session] = useOnyx(ONYXKEYS.SESSION, {canBeMissing: true});
const [lastOpenedPublicRoomID] = useOnyx(ONYXKEYS.LAST_OPENED_PUBLIC_ROOM_ID, {canBeMissing: true});
const [initialLastUpdateIDAppliedToClient] = useOnyx(ONYXKEYS.ONYX_UPDATES_LAST_UPDATE_ID_APPLIED_TO_CLIENT, {canBeMissing: true});

// On HybridApp we need to prevent flickering during transition to OldDot
Expand Down Expand Up @@ -328,10 +327,6 @@ function AuthScreens() {

App.redirectThirdPartyDesktopSignIn();

if (lastOpenedPublicRoomID) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we remove this code entirely here? Are we sure it won't introduce regressions on standalone NewDot?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, I added the web video and it looks fine - after sign in user is redirected to the public room

// Re-open the last opened public room if the user logged in from a public room link
Report.openLastOpenedPublicRoom(lastOpenedPublicRoomID);
}
Download.clearDownloads();

const unsubscribeOnyxModal = onyxSubscribe({
Expand Down
14 changes: 0 additions & 14 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4014,18 +4014,6 @@ function removeFromGroupChat(reportID: string, accountIDList: number[]) {
removeFromRoom(reportID, accountIDList);
}

function setLastOpenedPublicRoom(reportID: string) {
Onyx.set(ONYXKEYS.LAST_OPENED_PUBLIC_ROOM_ID, reportID);
}

/** Navigates to the last opened public room */
function openLastOpenedPublicRoom(lastOpenedPublicRoomID: string) {
Navigation.isNavigationReady().then(() => {
setLastOpenedPublicRoom('');
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(lastOpenedPublicRoomID));
});
}

/** Flag a comment as offensive */
function flagComment(reportID: string | undefined, reportAction: OnyxEntry<ReportAction>, severity: string) {
const originalReportID = getOriginalReportID(reportID, reportAction);
Expand Down Expand Up @@ -6117,7 +6105,6 @@ export {
navigateToConciergeChatAndDeleteReport,
clearCreateChatError,
notifyNewAction,
openLastOpenedPublicRoom,
openReport,
openReportFromDeepLink,
openRoomMembersPage,
Expand All @@ -6136,7 +6123,6 @@ export {
setDeleteTransactionNavigateBackUrl,
setGroupDraft,
setIsComposerFullSize,
setLastOpenedPublicRoom,
shouldShowReportActionNotification,
showReportActionNotification,
startNewChat,
Expand Down
8 changes: 1 addition & 7 deletions src/libs/actions/Session/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import HybridAppModule from '@expensify/react-native-hybrid-app';
import throttle from 'lodash/throttle';
import type {ChannelAuthorizationData} from 'pusher-js/types/src/core/auth/options';
import type {ChannelAuthorizationCallback} from 'pusher-js/with-encryption';
import {InteractionManager, Linking} from 'react-native';
import {InteractionManager} from 'react-native';
import type {OnyxEntry, OnyxKey, OnyxUpdate} from 'react-native-onyx';
import Onyx from 'react-native-onyx';
import {migrateHybridAppToNewPartnerName} from '@libs/actions/HybridApp';
Expand Down Expand Up @@ -269,12 +269,6 @@ function signOutAndRedirectToSignIn(shouldResetToHome?: boolean, shouldStashSess
Navigation.resetToHome();
}
Navigation.navigate(ROUTES.SIGN_IN_MODAL);
Linking.getInitialURL().then((url) => {
const reportID = getReportIDFromLink(url);
if (reportID) {
Onyx.merge(ONYXKEYS.LAST_OPENED_PUBLIC_ROOM_ID, reportID);
}
});
}
return;
}
Expand Down