From 9a679de9c9ec7b577038683683c2865bb6ded18b Mon Sep 17 00:00:00 2001 From: Grishka Date: Tue, 25 Jun 2024 17:18:40 +0300 Subject: [PATCH] Fix donations and update AppCenter SDK --- mastodon/build.gradle | 4 ++-- .../joinmastodon/android/fragments/HomeTimelineFragment.java | 2 +- .../android/fragments/settings/SettingsMainFragment.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mastodon/build.gradle b/mastodon/build.gradle index 0ea75a47..37ac5dd6 100644 --- a/mastodon/build.gradle +++ b/mastodon/build.gradle @@ -13,7 +13,7 @@ android { applicationId "org.joinmastodon.android" minSdk 23 targetSdk 34 - versionCode 104 + versionCode 105 versionName "2.5.2" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -101,7 +101,7 @@ dependencies { annotationProcessor 'org.parceler:parceler:1.1.12' coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3' - def appCenterSdkVersion = "4.4.2" + def appCenterSdkVersion = "5.0.4" appcenterPrivateBetaImplementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}" appcenterPrivateBetaImplementation "com.microsoft.appcenter:appcenter-distribute:${appCenterSdkVersion}" appcenterPublicBetaImplementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}" diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTimelineFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTimelineFragment.java index 260720c8..0a4205b8 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTimelineFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTimelineFragment.java @@ -118,7 +118,7 @@ public class HomeTimelineFragment extends StatusListFragment implements ToolbarD if(AccountSessionManager.get(accountID).isEligibleForDonations()){ GetDonationCampaigns req=new GetDonationCampaigns(Locale.getDefault().toLanguageTag().replace('-', '_'), String.valueOf(AccountSessionManager.get(accountID).getDonationSeed()), null); - if(BuildConfig.DEBUG && getActivity().getSharedPreferences("debug", Context.MODE_PRIVATE).getBoolean("donationsStaging", false)){ + if(getActivity().getSharedPreferences("debug", Context.MODE_PRIVATE).getBoolean("donationsStaging", false)){ req.setStaging(true); } req.setCallback(new Callback<>(){ diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsMainFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsMainFragment.java index ab9a5ab3..78f3fede 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsMainFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsMainFragment.java @@ -200,7 +200,7 @@ public class SettingsMainFragment extends BaseSettingsFragment{ private void onDonateClick(ListItem item){ GetDonationCampaigns req=new GetDonationCampaigns(Locale.getDefault().toLanguageTag().replace('-', '_'), String.valueOf(AccountSessionManager.get(accountID).getDonationSeed()), null); - if(BuildConfig.DEBUG && getActivity().getSharedPreferences("debug", Context.MODE_PRIVATE).getBoolean("donationsStaging", false)){ + if(getActivity().getSharedPreferences("debug", Context.MODE_PRIVATE).getBoolean("donationsStaging", false)){ req.setStaging(true); } req.setCallback(new Callback<>(){