-
Notifications
You must be signed in to change notification settings - Fork 1.5k
refactor: migrate RoomView to a function component #7482
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
Open
diegolmello
wants to merge
327
commits into
develop
Choose a base branch
from
native-34-roomview-hooks
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 167 commits
Commits
Show all changes
327 commits
Select commit
Hold shift + click to select a range
e84f436
perf: memoize returned closures from useMessagePress/useMessageLongPress
diegolmello 541e85b
perf: de-churn RoomView on incoming messages
diegolmello a3e2898
fix: re-hide a revealed ignored message when its ignore state changes
diegolmello cfc0e5a
fix: key Quote reply list by attachment identity, not array index
diegolmello 233b131
fix: derive RepliedThread display in render, fetch on real inputs
diegolmello 9e11259
refactor: drive useMediaAutoDownload status via an event reducer
diegolmello 529e69b
refactor: split MessageRoomProvider and diff-guard the store mirror
diegolmello 061658c
fix: narrow tmid before fetchThreadName in RepliedThread effect
diegolmello 3eec1c1
refactor: model RoomView interaction state as a discriminated union
diegolmello 722f0d4
fix: guard RepliedThread fetch against stale writes
diegolmello 67a6de9
merge: managing-state fixes (NATIVE-22 findings 001-006)
diegolmello dbac499
refactor: move Attachments unit tests into components/__tests__ (NATI…
diegolmello ca23750
refactor: move Attachments stories into components/stories and regist…
diegolmello 06e966b
refactor: flatten CollapsibleQuote and OverlayComponent to single-fil…
diegolmello 00027bc
refactor: retire RoomView getCustomEmoji in favor of useCustomEmoji i…
diegolmello 0a3d98f
refactor: dedupe TMessageAction into definitions (NATIVE-22)
diegolmello ce3d8ee
refactor: rename useIsInfo to useIsInfoMessage returning boolean (NAT…
diegolmello 4c906ea
refactor: pass isHeader into MessageInner instead of re-reading group…
diegolmello 81760b8
fix: remove self-assignment in CollapsibleQuote color override (NATIV…
diegolmello 827dc4d
refactor: use colors from useTheme instead of themes[theme] in Messag…
diegolmello 14e5726
docs: refine CONTEXT.md message glossary (NATIVE-22)
diegolmello 5dd2032
chore: format code and fix lint issues
diegolmello 112cdb9
refactor: guard appendQuote against duplicate ids and rename useArchi…
diegolmello 5dd895a
refactor: make REST string-ts path explicit in computeIsHeader, drop …
diegolmello c6b44d5
refactor: extract memoized RoomProviders FC, stabilize RoomView RoomC…
diegolmello d316bda
refactor: wire ShareView to shared RoomProviders FC (NATIVE-22)
diegolmello 7278a62
chore: remove console.count render log (NATIVE-22)
diegolmello d2b29fc
test: pin autoTranslate boundary for translate hooks (NATIVE-22)
diegolmello f41a8ba
chore: co-locate message testHelpers (NATIVE-22)
diegolmello 954b18f
refactor: narrow Discussion item subscription (NATIVE-22)
diegolmello e83d3f3
fix: unify autoTranslate boundary to truthy (NATIVE-22)
diegolmello b8c9a90
refactor: collapse item/previousItem effects to one (NATIVE-22)
diegolmello f98690c
refactor: drop bespoke action->interaction mapping in ShareView (NATI…
diegolmello 10521f4
refactor: extract useMessageTouchable pressability hook (NATIVE-22)
diegolmello da66df3
perf: sync only reactive fields in MessageRoomStoreProvider (NATIVE-22)
diegolmello f27d8aa
refactor: extract shared BranchAttachmentContent for message branches…
diegolmello e81c177
refactor: rename Touchable to MessageActionTouchable (NATIVE-22)
diegolmello 4afdf9f
chore: route ModalBlockView's empty-message fixture through unknown (…
diegolmello 3512115
refactor: strip redundant displayName from message components (NATIVE…
diegolmello 0381b55
Merge branch 'develop' into native-22-message-hooks
diegolmello f0c61cc
chore: refresh time-relative Timestamp story snapshot
diegolmello b074fee
refactor: rename InteractionStore to MessageActionStore, normalize ac…
diegolmello 01ad242
refactor: collapse message-action hooks into one useMessageAction() (…
diegolmello b0b3516
refactor: harden no-provider fallback with an inert MessageActionStor…
diegolmello 289d65e
merge: MessageActionStore refactor (NATIVE-22)
diegolmello 5b9bc59
fix: resync room-reactive fields in MessageRoomStore (NATIVE-22)
diegolmello 052ba9b
refactor: move MessageActionStore into containers/message/stores (NAT…
diegolmello 9e1d3f8
fix: restore Jitsi started-a-call line for jitsi_call_started message…
diegolmello 82637b9
test: document useFile's stuck isMessagePersisted contract (NATIVE-22)
diegolmello cf2b383
test: cover useMessageTouchable/useMessageLongPress/useMessagePress b…
diegolmello f768034
refactor: narrow IMessage.blocks and e2eMentions off any (NATIVE-22)
diegolmello 49ceb59
test: guard {memo:true} @json invariant (NATIVE-22)
diegolmello ffb81e9
feat: warn on capture-once store footguns (NATIVE-22)
diegolmello 5827c9c
refactor: drop dead editing/rightButtonsWidth state and close the any…
diegolmello 43494d2
test: close Blocks/RoomProviders/MessageRoomStore coverage gaps (NATI…
diegolmello d3283db
refactor: remove any from message story fixtures (NATIVE-22)
diegolmello 0a12d2f
refactor: split message components into Message/ (density) + Layout/ …
diegolmello 780456c
refactor: colocate Content orchestrator into Content/index.tsx (NATIV…
diegolmello 5e560b7
chore: annotate Touch.tsx with 'use memo' compiler directive (NATIVE-22)
diegolmello f2a428f
refactor: rename AttachmentLayout → ContentLayout (NATIVE-22)
diegolmello b907bc8
refactor: split Message and MessageTouchable into separate files (NAT…
diegolmello 954a30a
Merge branch 'develop' into native-22-message-hooks
diegolmello 387fd4a
fix: correct stale InteractionStore error message in MessageActionSto…
diegolmello de784df
refactor: use MessageActionProvider in prod, relocate test helper (NA…
diegolmello 149d7e1
chore: remove dead displayName and redundant comment (NATIVE-22)
diegolmello 6459910
chore: remove duplicate roomAttrsUpdate key (NATIVE-1354)
diegolmello 8db26c4
docs: add join-state vocabulary and Positional-state split (NATIVE-1353)
diegolmello 0a95808
refactor: group message touch-surfaces into Touchable/ (NATIVE-22)
diegolmello 555f941
docs: retire 'interaction' from glossary, fold into Message Action St…
diegolmello e5b0a68
refactor: extract useRoomSubscription hook (NATIVE-1356)
diegolmello 5ec4755
refactor: extract useJumpToMessage hook (NATIVE-1355)
diegolmello 514c18d
refactor: dedup message component helpers (NATIVE-22)
diegolmello 681691d
fix: emit fresh roomUpdate snapshot from useRoomSubscription (NATIVE-…
diegolmello 73004e8
docs: add Message component architecture reference (NATIVE-22)
diegolmello e09d96c
refactor: extract useHeader hook from RoomView
diegolmello e796a59
refactor: convert RoomView to a function component
diegolmello f03920e
refactor: remove frozen-handler dev guard from MessageRoomStore
diegolmello be9f9eb
fix: never quote edit/react message id in media ShareView (NATIVE-22)
diegolmello abe0f0c
refactor: move IRoomInfoParam to definitions (NATIVE-22)
diegolmello bba78b1
fix: defer room init behind interactions and stabilize its trigger (N…
diegolmello 59e8990
refactor: adopt 'use memo' annotation, drop manual memoization
diegolmello 0e6f1c1
fix: rebind ROOM_REMOVED listener when handler identity changes
diegolmello 9a8ccd6
test: cover useRoomSubscription unmount cleanup
diegolmello 901c0af
refactor: dissolve useRoomSubscription into rid-keyed RoomStore
diegolmello 82e5e6f
refactor: replace RoomContext with per-instance composer zustand store
diegolmello 2cbffca
refactor: extract useMessageActions hook from RoomView
diegolmello a61d2b6
refactor: extract useRoomLifecycle hook from RoomView
diegolmello d32fd36
refactor: extract useRoomNavigation hook from RoomView
diegolmello 7a32745
refactor: extract useOmnichannelPermissions hook from RoomView
diegolmello bf47367
refactor: extract MessageRow component from RoomView
diegolmello 8e442c5
refactor: extract RoomFooter + RoomMessageActions components from Roo…
diegolmello eabf381
refactor: drop room-object param from RoomView navigation route
diegolmello f44d17c
refactor: shrink useHeader to self-source ambient and store data
diegolmello 855d9b5
refactor: warm RoomStore at navigation time
diegolmello 34e17bf
refactor: annotate RoomView with 'use memo' and drop manual callbacks
diegolmello 0bc4c5c
refactor: drop dead fname field from goRoom warm-up
diegolmello 59f97b0
Merge remote-tracking branch 'origin/native-22-message-hooks' into na…
diegolmello 5dec20a
chore: format code and fix lint issues
diegolmello d5990e2
fix: subscribe MessageRow and RoomFooter to roomUpdate snapshots
diegolmello 9417a85
docs: drop removed FROZEN_KEYS guard references from message architec…
diegolmello a3e2801
fix: harden RoomStore init ordering, error logging and rid-less registry
diegolmello 3af0880
refactor: type ComposerStore contract and widen handleSendMessage
diegolmello fa8b597
test: add direct suites for useRoomLifecycle, useRoomNavigation and C…
diegolmello 72488db
refactor: extract useRoomWithUpdate hook with consumer re-render regr…
diegolmello 2f12a58
test: extend useRoomLifecycle and useRoomNavigation suites to unteste…
diegolmello 482f2c5
fix: keep composer placeholder fresh by threading roomUpdate into the…
diegolmello 8f7bb24
fix: discard superseded omnichannel permission fetches with effect-sc…
diegolmello bcc5918
fix: derive MessageRow isIgnored and badge color inside store selectors
diegolmello 2b37d2b
test: add React Compiler compilation contract for RoomView
diegolmello ea36011
refactor: remove exhaustive-deps suppressions so RoomView index compiles
diegolmello eb14e7d
refactor: move omnichannel permission helpers to module scope so hook…
diegolmello a29e7c5
refactor: unblock compiler on useRoomNavigation with useDebounce and …
diegolmello 8ee630b
refactor: hoist jumpToMessage impl to module scope so the compiler st…
diegolmello 535cc49
refactor: de-suppress useScroll effects so the compiler stops skippin…
diegolmello 70f090f
refactor: de-suppress useRoomLifecycle so the compiler stops skipping…
diegolmello 56bff8a
Merge remote-tracking branch 'origin/develop' into native-34-roomview…
diegolmello 5da0337
perf(RoomView): render fewer rows in first batch for non-anchored lists
diegolmello 380a9bf
refactor(RoomView): move ComposerState to definitions, type ComposerS…
diegolmello a7d720a
refactor(RoomView): derive readOnly/E2EE at read-time, remove orchest…
diegolmello a59c9c9
refactor(RoomView): extract jumpToMessage impl into a service
diegolmello d80fbb5
refactor(RoomView): dissolve useRoomLifecycle into focused hooks
diegolmello fa8eb96
refactor(message): add useRoomMessageHandlers for self-sourced messag…
diegolmello 269eaee
refactor(RoomView): extract MessageRow hooks and fix render-phase haptic
diegolmello ff421d2
refactor(message): self-source leaf handlers via useRoomMessageHandlers
diegolmello a498ce3
refactor(RoomView): convert RightButtons to function component and sh…
diegolmello 37a16f0
refactor(RoomView): decompose RoomFooter into self-sourcing branch co…
diegolmello f98c852
refactor(RoomView): make omnichannel permission flags reactive via us…
diegolmello b4c9067
perf(message): gate per-row a11y ordering wrappers behind accessibili…
diegolmello 8bc6793
test(RoomView): update LoadMore story snapshots after a11y wrapper ga…
diegolmello d6c9e97
refactor(RoomView): consolidate shared types, drop barrels and test-o…
diegolmello 2312900
fix(RoomView): clear eslint errors across refactored hooks
diegolmello 3fbc2b4
fix(RoomView): pass joinCodeRequired through navigation so protected …
diegolmello 5ebf8c6
fix(RoomView): restore initialNumToRender=20 so non-anchored scroll p…
diegolmello 53e5d21
test(e2e): wait for main room to settle after leaving thread before s…
diegolmello 3457574
fix(RoomView): capture rid/t/tmid once at mount so popTo param wipe c…
diegolmello 198fc39
Merge branch 'develop' into native-34-roomview-hooks
diegolmello 07198fc
fix(RoomView): split RoomStore registry into peek/acquire/release to …
diegolmello dcc4565
refactor(RoomView): apply Phase 2 comment/test verdicts + relocate ho…
diegolmello f43feb5
refactor(RoomView): move autocomplete a11y announce into a colocated …
diegolmello 266e3f0
fix(RoomView): harden useRoomStoreByRid fallback and defer unmount re…
diegolmello 05b2db6
refactor(RoomView): make join/resume creator-owned actions, drop stor…
diegolmello 545fce6
refactor(RoomView): produce message handlers in RoomView, inject via …
diegolmello 8ccdb24
refactor(RoomView): adopt usePermissions, split observer hooks, dedup…
diegolmello f4f33cc
refactor(message): source user/baseUrl from redux, drop MessageRoomSt…
diegolmello 635241e
refactor(RoomView): Phase 8 conventions sweep — theme, navigation, ty…
diegolmello 29bbe91
refactor(RoomView): move root components into components/
diegolmello b1aceca
Merge remote-tracking branch 'origin/native-34-roomview-hooks' into n…
diegolmello 1615f6d
chore: format code and fix lint issues
diegolmello afb6a3e
refactor(RoomView): align latest-ref usage with escape-hatches review
diegolmello ed710d8
Merge branch 'native-34-roomview-hooks' of github.com:RocketChat/Rock…
diegolmello 1fa03be
refactor(RoomView): extract shared pushThreadRoom service
diegolmello a6e80df
refactor(RoomView): dedup reaction handlers and send path
diegolmello 5bfeaf8
refactor(RoomView): type message-hook params, drop any/Function and t…
diegolmello 8a6d4df
fix(RoomView): recompute livechat on-hold permission on pure onHold t…
diegolmello fe17027
fix(RoomView): mechanical review nits (log, effect cleanup, named hel…
diegolmello c54bb03
refactor(RoomView): dedup ComposerStore sync field list via rest state
diegolmello 71d2451
fix(RoomView): warn when acquireRoomStore misses a swept registry entry
diegolmello 9ad61cd
refactor(RoomView): self-source props, drop mapStateToProps + HOCs
diegolmello 6d54182
refactor(RoomView): dedup dual-mode override + roomUpdate-freshness p…
diegolmello 3717594
perf(RoomView): stop per-message header rebuild in useHeader
diegolmello 36f27a5
perf(RoomView): fetch livechat routing config once, derive on-hold se…
diegolmello 74b28bd
refactor(MessageComposer): derive quoted/editing selectors in Message…
diegolmello cd162f9
refactor(MessageRoomStore): type nav-param, merge overrides, split re…
diegolmello 6bf89cf
refactor(isReadOnly): extract shared branch evaluator
diegolmello 71ffc1d
fix(isReadOnly): short-circuit archived/muted before permission fetch
diegolmello eaa7412
refactor(RoomView): drop legacy connect/forwardRef/withMasterDetail f…
diegolmello 916cb5f
refactor(RoomView): render MessageRow directly, drop renderRow render…
diegolmello 784d171
refactor(RoomView): batch quick-win cleanups
diegolmello 7c29414
Merge remote-tracking branch 'origin/develop' into native-34-roomview…
diegolmello ad4187b
cleanup
diegolmello a137b83
cleanup
diegolmello 9b1dbc7
Merge branch 'native-34-roomview-hooks' of github.com:RocketChat/Rock…
diegolmello 8ac3e8b
Merge branch 'native-34-roomview-hooks' of github.com:RocketChat/Rock…
diegolmello e33a09f
Merge branch 'native-34-roomview-hooks' of github.com:RocketChat/Rock…
diegolmello ab7a54d
Merge branch 'develop' into native-34-roomview-hooks
diegolmello 0a46316
Merge branch 'develop' into native-34-roomview-hooks
diegolmello 1067f85
chore: drop 'use memo' directives now that the compiler runs in infer…
diegolmello 0f7cd47
Merge remote-tracking branch 'origin/native-34-roomview-hooks' into n…
diegolmello 036d593
fix: keep RoomView header working after a param wipe
diegolmello 17989a5
fix(RoomView): keep the join-code trigger on the screen, not the shar…
diegolmello ced8ac4
fix: keep the room footer from flickering when a thread screen mounts
diegolmello b8c148f
fix: keep the channel unread divider when replying in a thread
diegolmello 40fb713
fix: retry a room that fails to load instead of leaving it empty
diegolmello 36bf5cc
refactor: give init a real result and a per-run cancel token
diegolmello cf9ed60
refactor: let init own the room reads and writes
diegolmello ad78362
refactor: give the room screen's own state one home
diegolmello 94488f3
Merge remote-tracking branch 'origin/develop' into native-34-roomview…
diegolmello b5018fa
refactor(RoomView): encapsulate RoomStore ownership
diegolmello 8c314d6
refactor(RoomStore): collapse duplicate registry acquire paths
diegolmello 810458a
refactor(RoomView): drop unused hook return surface
diegolmello 49654cb
refactor(RoomView): share one context guard per store
diegolmello a70ca45
refactor(RoomView): read records through the database services
diegolmello e96efad
refactor(RoomView): drop unused escape hatches and stale state type
diegolmello 3c37975
refactor(RoomView): drop redundant guard and pass-through in message …
diegolmello 3c2fd5e
refactor(message): pass room handlers as one bag from every view
diegolmello 1d20f9c
perf(RoomView): read thread unreads from the observed room store
diegolmello af548b4
perf(RoomView): fetch the DM counterpart alongside the message load
diegolmello 622ac46
perf(RoomView): fetch the livechat routing config once per screen
diegolmello 76141b2
refactor(RoomView): drop a redundant comment and a tautological test
diegolmello 653e72a
refactor(RoomView): drop the useRightButtons pass-through (#7630)
diegolmello eb08cc6
refactor(RoomView): pass the message handler bag as a prop (#7629)
diegolmello ceb7209
refactor(RoomView): rename listRef to listContainerRef and drop resta…
diegolmello 1d5b998
refactor(RoomView): drop the unused consumeJumpParam from useJumpToMe…
diegolmello 7944244
refactor(RoomView): inline the useRoomActions pass-through
diegolmello 97d5f2d
refactor(RoomView): colocate MessageRow's single-caller hooks
diegolmello 543554d
refactor(RoomView): extract getRoomHeaderProps out of useHeader's effect
diegolmello 764c06f
refactor(RoomView): make getRoomHeaderProps module-private
diegolmello a2af57f
refactor(RoomView): turn useMessageSeparators into a pure function
diegolmello a649711
refactor(RightButtons): extract navigateToScreen helper
diegolmello bb97d39
refactor(RoomView): rename isGroupChatValue to roomIsGroupChat
diegolmello 5703498
refactor(RoomView): read Banner colors from useTheme
diegolmello 2e01926
refactor(RoomView): move toggleFollowThread to lib/methods
diegolmello 73674e7
refactor(MessageComposer): select only the action kind
diegolmello 45b964c
chore(MessageComposer): update stale TODO referent
diegolmello ccae769
refactor(MessageActionStore): group useMessageActionKind with useMess…
diegolmello c3ecdd2
refactor(RightButtons): narrow navigateToScreen typing
diegolmello d5ad52a
docs(RoomView): describe the current design, not its history
diegolmello f7ac989
test(RoomView): keep one copy of the shared onReactionPress cases
diegolmello 984c925
test(RoomStore): drop cases subsumed by siblings
diegolmello 7023456
test(MessageComposer): stub useQuotedMessageIds instead of reimplemen…
diegolmello 9ee278c
test(usePermissions): assert literal expectations instead of hasPermi…
diegolmello 5a2845d
test(message): drop vacuous prop-type assertions and a restated gate-…
diegolmello ceb9d01
test(RoomView): drop the mount-only case covered by its neighbours
diegolmello 259ce8e
test(RoomProviders): drop the composer value case covered by Composer…
diegolmello 00e4f54
test(useHeader): drop typeof header assertions and a mock echo
diegolmello 3f69371
test(useRoomInit): keep only the distinct rejects case
diegolmello cdb61db
test(useGoRoomActionsView): drop the case the body cannot observe
diegolmello 0358239
test(useJumpToMessage): name the out-of-window case for what it asserts
diegolmello 4d637f9
docs(RoomView): point the unsourced invariants and init caller at rea…
diegolmello 36827dd
test(RoomProviders): assert rid reaches the composer store
diegolmello 40a12a9
refactor(RoomView): extract indexOfMessage in useScroll
diegolmello bc57429
refactor(RoomView): rename shouldNavigateToRoom to isTargetOutsideCur…
diegolmello 205c120
refactor(RoomView): drop stale timeout comment in jumpToMessage
diegolmello c3d187f
refactor(MessageStore): share the auto-translate predicate
diegolmello 8ef0c8a
refactor(ComposerInput): rename result to textBeforeMention
diegolmello fb2727f
refactor(MessageStore): return the auto-translate language instead of…
diegolmello 0bc1c39
refactor(RoomView): name the thread name result in pushThreadRoom
diegolmello babf69b
refactor(RoomView): name the re-scroll target index in useScroll
diegolmello 1fdb20b
chore(RoomView): remove docs folder
diegolmello 99f9760
Merge remote-tracking branch 'origin/develop' into native-34-roomview…
diegolmello be5b0b0
refactor(RoomView): unblock compiler for ReactionPicker (#7633)
diegolmello e9d971f
refactor(RoomView): observe the followed thread through useSyncExtern…
diegolmello 4dbf414
Merge branch 'develop' into native-34-roomview-hooks
diegolmello 6c1bfb8
chore: format code and fix lint issues
diegolmello 915fd10
refactor(RoomView): first-tier simplifications after the hooks migrat…
diegolmello 8e4d389
refactor(RoomView): make messaging callback wiring explicit (#7639)
diegolmello bad92c2
refactor(RoomView): tidy room screen components (#7641)
diegolmello ffddd22
refactor: simplify MessageComposer (#7640)
diegolmello d4f1b76
refactor(RoomView): narrow hook subscriptions and drop redundant indi…
diegolmello 3c469a3
refactor(RoomView): own room stores per screen (#7642)
diegolmello 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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
|---|---|---|
|
|
@@ -9,12 +9,14 @@ import Navigation from '../../../../lib/navigation/appNavigation'; | |
| import { useMasterDetail } from '../../../../lib/hooks/useMasterDetail'; | ||
| import { usePermissions } from '../../../../lib/hooks/usePermissions'; | ||
| import { useCanUploadFile, useChooseMedia } from '../../hooks'; | ||
| import { useRoomContext } from '../../../../views/RoomView/context'; | ||
| import { useComposerRid, useComposerTmid, useComposerType } from '../../../../views/RoomView/stores/ComposerStore'; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. composer shouldn't import from RoomView |
||
|
|
||
| export const ActionsButton = () => { | ||
| 'use memo'; | ||
|
|
||
| const { rid, tmid, t } = useRoomContext(); | ||
| const rid = useComposerRid(); | ||
| const tmid = useComposerTmid(); | ||
| const t = useComposerType(); | ||
| const { closeEmojiKeyboardAndAction } = useContext(MessageInnerContext); | ||
| const permissionToUpload = useCanUploadFile(rid); | ||
| const [permissionToViewCannedResponses] = usePermissions(['view-canned-responses'], rid); | ||
|
|
||
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No import from RoomView