Skip to content

Commit 543873b

Browse files
committed
rename
1 parent c41d9db commit 543873b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/app/Components/ContextMenu/ContextMenuArtwork.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { useShareSheet } from "app/Components/ShareSheet/ShareSheetContext"
88
import { LegacyNativeModules } from "app/NativeModules/LegacyNativeModules"
99
import { cm2in } from "app/utils/conversions"
1010
import { useFeatureFlag } from "app/utils/hooks/useFeatureFlag"
11-
import { isDislikeArtworksEnabled } from "app/utils/isDislikeArtworksEnabled"
11+
import { isDislikeArtworksEnabledFor } from "app/utils/isDislikeArtworksEnabledFor"
1212
import { useDislikeArtwork } from "app/utils/mutations/useDislikeArtwork"
1313
import { Schema } from "app/utils/track"
1414
import { InteractionManager, Platform } from "react-native"
@@ -90,7 +90,7 @@ export const ContextMenuArtwork: React.FC<ContextMenuArtworkProps> = ({
9090
const shouldDisplayContextMenu = isIOS && enableContextMenu
9191
const enableCreateAlerts = !!artwork.artists?.length
9292
const enableViewInRoom = LegacyNativeModules.ARCocoaConstantsModule.AREnabled && isHangable
93-
const enableSupressArtwork = isDislikeArtworksEnabled(contextModule)
93+
const enableSupressArtwork = isDislikeArtworksEnabledFor(contextModule)
9494

9595
const openViewInRoom = () => {
9696
if (artwork?.widthCm == null || artwork?.heightCm == null || image?.url == null) {

src/app/Scenes/HomeView/Sections/HomeViewSectionArtworks.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { useHomeViewTracking } from "app/Scenes/HomeView/hooks/useHomeViewTracki
2424
import { navigate } from "app/system/navigation/navigate"
2525
import { extractNodes } from "app/utils/extractNodes"
2626
import { NoFallback, withSuspense } from "app/utils/hooks/withSuspense"
27-
import { isDislikeArtworksEnabled } from "app/utils/isDislikeArtworksEnabled"
27+
import { isDislikeArtworksEnabledFor } from "app/utils/isDislikeArtworksEnabledFor"
2828
import { useMemoizedRandom } from "app/utils/placeholders"
2929
import { times } from "lodash"
3030
import { memo } from "react"
@@ -45,7 +45,7 @@ export const HomeViewSectionArtworks: React.FC<HomeViewSectionArtworksProps> = (
4545
const section = useFragment(fragment, sectionProp)
4646
let artworks = extractNodes(section.artworksConnection)
4747

48-
if (isDislikeArtworksEnabled(section.contextModule)) {
48+
if (isDislikeArtworksEnabledFor(section.contextModule)) {
4949
artworks = artworks.filter((artwork) => !artwork.isDisliked)
5050
}
5151

src/app/utils/isDislikeArtworksEnabled.ts src/app/utils/isDislikeArtworksEnabledFor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ const ENABLED_CONTEXT_MODULES = [
1010
/**
1111
* returns true if hiding disliked artworks is enabled for the given context module
1212
*/
13-
export const isDislikeArtworksEnabled = (contextModule: string | null | undefined) => {
13+
export const isDislikeArtworksEnabledFor = (contextModule: string | null | undefined) => {
1414
return ENABLED_CONTEXT_MODULES.includes(contextModule as ContextModule)
1515
}

0 commit comments

Comments
 (0)