Skip to content

Commit

Permalink
style: fix some ui cannot click
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Jun 24, 2024
1 parent bd0153a commit ee66868
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
2 changes: 1 addition & 1 deletion TMessagesProj/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repositories {
}

def verName = "10.13.1"
def verCode = 1180
def verCode = 1181


def officialVer = "10.13.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import org.telegram.messenger.AndroidUtilities;
import org.telegram.messenger.ApplicationLoader;
import org.telegram.messenger.BuildVars;
import org.telegram.messenger.ChatObject;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.MessagesController;
Expand All @@ -27,6 +28,7 @@
import org.telegram.ui.Components.BottomSheetWithRecyclerListView;
import org.telegram.ui.Components.CubicBezierInterpolator;
import org.telegram.ui.Components.LayoutHelper;
import org.telegram.ui.Components.Premium.PremiumNotAvailableBottomSheet;
import org.telegram.ui.Components.Premium.PremiumPreviewBottomSheet;
import org.telegram.ui.Components.Premium.boosts.adapters.BoostAdapter;
import org.telegram.ui.Components.Premium.boosts.cells.ActionBtnCell;
Expand Down Expand Up @@ -187,6 +189,14 @@ public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newStat
updateRows(false, false);
actionBtn = new ActionBtnCell(getContext(), resourcesProvider);
actionBtn.setOnClickListener(v -> {

// ---- nagram start ----
if (BuildVars.IS_BILLING_UNAVAILABLE) {
fragment.showDialog(new PremiumNotAvailableBottomSheet(fragment));
return;
}
// ---- nagram end ----

if (actionBtn.isLoading()) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import org.telegram.messenger.AndroidUtilities;
import org.telegram.messenger.BillingController;
import org.telegram.messenger.BuildVars;
import org.telegram.messenger.NotificationCenter;
import org.telegram.messenger.R;
import org.telegram.messenger.UserConfig;
Expand All @@ -40,6 +41,7 @@
import org.telegram.ui.Components.ColoredImageSpan;
import org.telegram.ui.Components.LayoutHelper;
import org.telegram.ui.Components.Premium.PremiumGradient;
import org.telegram.ui.Components.Premium.PremiumNotAvailableBottomSheet;
import org.telegram.ui.Components.Premium.PremiumPreviewBottomSheet;
import org.telegram.ui.Components.Premium.boosts.cells.DurationWithDiscountCell;
import org.telegram.ui.Components.Premium.boosts.cells.selector.SelectorBtnCell;
Expand Down Expand Up @@ -248,6 +250,14 @@ private void init() {
buttonContainer.setBackgroundColor(Theme.getColor(Theme.key_dialogBackground, resourcesProvider));
actionBtn = new GradientButtonWithCounterView(getContext(), true, resourcesProvider);
actionBtn.setOnClickListener(v -> {

// ---- nagram start ----
if (BuildVars.IS_BILLING_UNAVAILABLE && getBaseFragment() != null) {
getBaseFragment().showDialog(new PremiumNotAvailableBottomSheet(getBaseFragment()));
return;
}
// ---- nagram end ----

if (actionBtn.isLoading()) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ private void getNewVersionMessagesCallback(Delegate delegate, Update json,
update.url = json.url;
update.flags |= 4;
}
if (NekoXConfig.autoUpdateReleaseChannel == 0 && !update.can_not_skip) {
delegate.onTLResponse(null, null);
return;
}
if (response != null) {
var res = (TLRPC.messages_Messages) response;
getMessagesController().removeDeletedMessagesFromArray(CHANNEL_METADATA_ID, res.messages);
Expand Down Expand Up @@ -173,10 +177,6 @@ public void checkNewVersionAvailable(Delegate delegate) {
}

public void checkNewVersionAvailable(Delegate delegate, boolean updateAlways_) {
if (NekoXConfig.autoUpdateReleaseChannel == 0) {
delegate.onTLResponse(null, null);
return;
}
updateAlways = updateAlways_;
load(delegate);
}
Expand Down

0 comments on commit ee66868

Please sign in to comment.