HomePhabricator
Diffusion Comm c8fa18ba6cc5

[native] Change ChatContextProvider position

Description

[native] Change ChatContextProvider position

Summary:
This diff changes position of ChatContextProvider. It is necessary, because we use useNavigation hook in markdown-chat-mention.react.js and when we render dummy nodes (which are needed for our virtualised list) we don't have access to NavigationContainer.

Depends on D8846.

Test Plan:
Tested if ChatContextProvider is used in:

  • MessageSearchProvider
  • RegistrationContextProvider
  • SQLiteDataHandler
  • ConnectedStatusBar
  • ReduxPersistGate
  • gated:
    • LifecycleHandler
    • DisconnectedBarVisibilityHandler
    • DimensionsUpdater
    • ConnectivityUpdater
    • ThemeHandler
    • OrientationHandler
  • PersistedStateGate
  • Socket

and it is not. Also checked locations where we use ChatContext:

  • native/chat/message-list-container.react.js
  • native/chat/message-list-types.js
  • native/chat/message-results-sceen.react.js
  • native/chat/multimedia/robotext/text-message.react.js
  • native/chat/sidebar-navigation.js
  • native/search/message-search.react.js
  • native/tooltip/tooltip.react.js

All of these files are "inside" RootNavigator. Only chatMessageItemKey from native/chat/utils.js is used in chat-item-height-measurer.react.js but this file is used in chat-context-provider.react.js only.

Reviewers: tomek, inka

Reviewed By: tomek, inka

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D8847

Details

Provenance
patrykAuthored on Sep 1 2023, 2:43 AM
Reviewer
tomek
Differential Revision
D8847: [native] Change ChatContextProvider position
Parents
rCOMM2e88d37a2e83: [native] Use chat mention candidates in markdown rules
Branches
Unknown
Tags
Unknown