Skip to content

Commit

Permalink
chore: remove some premium suggestions
Browse files Browse the repository at this point in the history
Co-authored-by: tehcneko <[email protected]>
  • Loading branch information
omg-xtao and tehcneko committed Jan 14, 2024
1 parent 7359469 commit 32f69ef
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -5437,28 +5437,28 @@ private int getMaxScrollYOffset() {
}

public boolean isPremiumRestoreHintVisible() {
if (!MessagesController.getInstance(currentAccount).premiumFeaturesBlocked() && folderId == 0) {
return MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_RESTORE") && !getUserConfig().isPremium();
}
// if (!MessagesController.getInstance(currentAccount).premiumFeaturesBlocked() && folderId == 0) {
// return MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_RESTORE") && !getUserConfig().isPremium();
// }
return false;
}

public boolean isPremiumChristmasHintVisible() {
if (!MessagesController.getInstance(currentAccount).premiumFeaturesBlocked() && folderId == 0) {
return MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_CHRISTMAS");
}
// if (!MessagesController.getInstance(currentAccount).premiumFeaturesBlocked() && folderId == 0) {
// return MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_CHRISTMAS");
// }
return false;
}

public boolean isPremiumHintVisible() {
if (!MessagesController.getInstance(currentAccount).premiumFeaturesBlocked() && folderId == 0) {
if (MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_UPGRADE") && getUserConfig().isPremium() || MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_ANNUAL") && !getUserConfig().isPremium()) {
if (UserConfig.getInstance(currentAccount).isPremium() ? !BuildVars.useInvoiceBilling() && MediaDataController.getInstance(currentAccount).getPremiumHintAnnualDiscount(true) != null : MediaDataController.getInstance(currentAccount).getPremiumHintAnnualDiscount(false) != null) {
isPremiumHintUpgrade = MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_UPGRADE");
return true;
}
}
}
// if (!MessagesController.getInstance(currentAccount).premiumFeaturesBlocked() && folderId == 0) {
// if (MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_UPGRADE") && getUserConfig().isPremium() || MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_ANNUAL") && !getUserConfig().isPremium()) {
// if (UserConfig.getInstance(currentAccount).isPremium() ? !BuildVars.useInvoiceBilling() && MediaDataController.getInstance(currentAccount).getPremiumHintAnnualDiscount(true) != null : MediaDataController.getInstance(currentAccount).getPremiumHintAnnualDiscount(false) != null) {
// isPremiumHintUpgrade = MessagesController.getInstance(currentAccount).pendingSuggestions.contains("PREMIUM_UPGRADE");
// return true;
// }
// }
// }
return false;
}

Expand Down

0 comments on commit 32f69ef

Please sign in to comment.