Skip to content

Commit

Permalink
remove the check for android webview in reader revenue banner
Browse files Browse the repository at this point in the history
  • Loading branch information
marjisound committed Jan 22, 2025
1 parent 2a8792f commit 4f043a6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ const buildRRBannerConfigWith = ({
tags,
contributionsServiceUrl,
idApiUrl,
isAndroidWebview,
}: {
isSignedIn: boolean;
countryCode: CountryCode;
Expand All @@ -116,7 +115,6 @@ const buildRRBannerConfigWith = ({
tags: TagType[];
contributionsServiceUrl: string;
idApiUrl: string;
isAndroidWebview: boolean;
}): CandidateConfig<BannerProps> => {
return {
candidate: {
Expand Down Expand Up @@ -151,7 +149,6 @@ const buildRRBannerConfigWith = ({
idApiUrl,
signInGateWillShow,
asyncArticleCounts,
isAndroidWebview,
}),
show:
({ meta, module, fetchEmail }: BannerProps) =>
Expand Down Expand Up @@ -245,7 +242,6 @@ export const StickyBottomBanner = ({
isPreview,
currentLocaleCode: countryCode,
});
const isAndroidWebview = false; // TODO: fix in upcoming commit !!useIsAndroid();

useEffect(() => {
setAsyncArticleCounts(getArticleCounts(pageId, tags, contentType));
Expand Down Expand Up @@ -282,7 +278,6 @@ export const StickyBottomBanner = ({
tags,
contributionsServiceUrl,
idApiUrl,
isAndroidWebview,
});
const brazeArticleContext: BrazeArticleContext = {
section: sectionId,
Expand Down Expand Up @@ -316,7 +311,6 @@ export const StickyBottomBanner = ({
contentType,
contributionsServiceUrl,
idApiUrl,
isAndroidWebview,
isMinuteArticle,
isPaidContent,
isPreview,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ type CanShowProps = BaseProps & {
idApiUrl: string;
signInGateWillShow: boolean;
asyncArticleCounts: Promise<ArticleCounts | undefined>;
isAndroidWebview: boolean;
};

type ReaderRevenueComponentType =
Expand Down Expand Up @@ -192,15 +191,9 @@ export const canShowRRBanner: CanShowFunctionType<BannerProps> = async ({
idApiUrl,
signInGateWillShow,
asyncArticleCounts,
isAndroidWebview,
}) => {
if (!remoteBannerConfig) return { show: false };

if (isAndroidWebview) {
// Do not show banners on Android app webview, due to buggy behaviour with the buttons
return { show: false };
}

if (
shouldHideReaderRevenue ||
isPaidContent ||
Expand Down

0 comments on commit 4f043a6

Please sign in to comment.