From 3b08403289385aa47a61a41dffd55cc1b0b4574e Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sun, 23 Oct 2022 11:41:45 +0800 Subject: [PATCH] fix: Premium Preview Ads --- .../ui/Components/Premium/PremiumFeatureBottomSheet.java | 1 + 1 file changed, 1 insertion(+) diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/Premium/PremiumFeatureBottomSheet.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/Premium/PremiumFeatureBottomSheet.java index 05515c55c..8c2d602fd 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/Premium/PremiumFeatureBottomSheet.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/Premium/PremiumFeatureBottomSheet.java @@ -246,6 +246,7 @@ public class PremiumFeatureBottomSheet extends BottomSheet implements Notificati bottomPages.setPageOffset(position, positionOffset); selectedPosition = position; toPosition = positionOffsetPixels > 0 ? selectedPosition + 1 : selectedPosition - 1; + if (toPosition < 0) toPosition = 0; progress = positionOffset; checkPage(); }