diff --git a/TMessagesProj/build.gradle b/TMessagesProj/build.gradle
index 564d42797..c9a4d55b3 100644
--- a/TMessagesProj/build.gradle
+++ b/TMessagesProj/build.gradle
@@ -5,8 +5,8 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
-def verName = "7.1.3-preview02"
-def verCode = 75
+def verName = "7.1.3-rc03"
+def verCode = 78
def serviceAccountCredentialsFile = rootProject.file("service_account_credentials.json")
@@ -344,6 +344,9 @@ android {
}
full {
}
+ fullPlay {
+ versionNameSuffix '-play'
+ }
fullNoEmoji {
versionNameSuffix '-full-no-emoji'
}
diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MessagesController.java b/TMessagesProj/src/main/java/org/telegram/messenger/MessagesController.java
index 9e59971e9..414f0a976 100644
--- a/TMessagesProj/src/main/java/org/telegram/messenger/MessagesController.java
+++ b/TMessagesProj/src/main/java/org/telegram/messenger/MessagesController.java
@@ -13264,7 +13264,7 @@ public class MessagesController extends BaseController implements NotificationCe
}
for (int a = 0, N = reasons.size(); a < N; a++) {
TLRPC.TL_restrictionReason reason = reasons.get(a);
- if ("all".equals(reason.platform) || "android".equals(reason.platform)) {
+ if ("all".equals(reason.platform) || "android".equals(reason.platform) && !NekoConfig.ignoreContentRestrictions) {
return reason.text;
}
}
@@ -13369,7 +13369,7 @@ public class MessagesController extends BaseController implements NotificationCe
closeLast = true;
}
}
- if (reason != null) {
+ if (reason != null && !NekoConfig.ignoreContentRestrictions) {
showCantOpenAlert(fragment, reason);
} else {
Bundle args = new Bundle();
diff --git a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/NekoConfig.java b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/NekoConfig.java
index 20bc45b46..bc8fe1039 100644
--- a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/NekoConfig.java
+++ b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/NekoConfig.java
@@ -119,6 +119,8 @@ public class NekoConfig {
public static boolean autoPauseVideo;
public static boolean disableProximityEvents;
+ public static boolean ignoreContentRestrictions;
+
public static String getOpenPGPAppName() {
if (StrUtil.isNotBlank(openPGPApp)) {
@@ -249,6 +251,8 @@ public class NekoConfig {
disableVibration = preferences.getBoolean("disableVibration", false);
autoPauseVideo = preferences.getBoolean("autoPauseVideo", false);
+ ignoreContentRestrictions = preferences.getBoolean("ignoreContentRestrictions", false);
+
}
public static void toggleShowAddToSavedMessages() {
@@ -779,4 +783,10 @@ public class NekoConfig {
}
+ public static void toggleIgnoreContentRestrictions() {
+
+ preferences.edit().putBoolean("ignoreContentRestrictions",ignoreContentRestrictions = !ignoreContentRestrictions).apply();
+
+ }
+
}
\ No newline at end of file
diff --git a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoExperimentalSettingsActivity.java b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoExperimentalSettingsActivity.java
index 11408d14e..a8c5ce703 100644
--- a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoExperimentalSettingsActivity.java
+++ b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoExperimentalSettingsActivity.java
@@ -17,6 +17,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import org.telegram.messenger.AndroidUtilities;
+import org.telegram.messenger.BuildConfig;
import org.telegram.messenger.FileLog;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.R;
@@ -44,6 +45,7 @@ import java.util.ArrayList;
import tw.nekomimi.nekogram.MessageHelper;
import tw.nekomimi.nekogram.NekoConfig;
+import tw.nekomimi.nekogram.NekoXConfig;
@SuppressLint("RtlHardcoded")
public class NekoExperimentalSettingsActivity extends BaseFragment {
@@ -62,6 +64,7 @@ public class NekoExperimentalSettingsActivity extends BaseFragment {
private int mediaPreviewRow;
private int proxyAutoSwitchRow;
private int disableFilteringRow;
+ private int ignoreContentRestrictionsRow;
private int unlimitedFavedStickersRow;
private int unlimitedPinnedDialogsRow;
private int deleteAccountRow;
@@ -124,6 +127,11 @@ public class NekoExperimentalSettingsActivity extends BaseFragment {
AndroidUtilities.runOnUIThread(() -> AlertsCreator.processError(currentAccount, error, this, req));
}
}));
+ } else if (position == ignoreContentRestrictionsRow) {
+ NekoConfig.toggleIgnoreContentRestrictions();
+ if (view instanceof TextCheckCell) {
+ ((TextCheckCell) view).setChecked(NekoConfig.ignoreContentRestrictions);
+ }
} else if (position == unlimitedFavedStickersRow) {
NekoConfig.toggleUnlimitedFavedStickers();
if (view instanceof TextCheckCell) {
@@ -254,6 +262,7 @@ public class NekoExperimentalSettingsActivity extends BaseFragment {
mediaPreviewRow = rowCount++;
proxyAutoSwitchRow = rowCount++;
disableFilteringRow = rowCount++;
+ ignoreContentRestrictionsRow = !BuildConfig.VERSION_NAME.contains("play") || NekoXConfig.developerMode ? rowCount++ : -1;
unlimitedFavedStickersRow = rowCount++;
unlimitedPinnedDialogsRow = rowCount++;
deleteAccountRow = rowCount++;
@@ -388,6 +397,8 @@ public class NekoExperimentalSettingsActivity extends BaseFragment {
if (position == disableFilteringRow) {
textCell.setTextAndValueAndCheck(LocaleController.getString("SensitiveDisableFiltering", R.string.SensitiveDisableFiltering), LocaleController.getString("SensitiveAbout", R.string.SensitiveAbout), sensitiveEnabled, true, true);
textCell.setEnabled(sensitiveCanChange, null);
+ } else if (position == ignoreContentRestrictionsRow) {
+ textCell.setTextAndValueAndCheck(LocaleController.getString("IgnoreContentRestrictions", R.string.IgnoreContentRestrictions), LocaleController.getString("IgnoreContentRestrictionsNotice", R.string.IgnoreContentRestrictionsNotice), NekoConfig.ignoreContentRestrictions, true, true);
} else if (position == unlimitedFavedStickersRow) {
textCell.setTextAndValueAndCheck(LocaleController.getString("UnlimitedFavoredStickers", R.string.UnlimitedFavoredStickers), LocaleController.getString("UnlimitedFavoredStickersAbout", R.string.UnlimitedFavoredStickersAbout), NekoConfig.unlimitedFavedStickers, true, true);
} else if (position == smoothKeyboardRow) {
diff --git a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoSettingsActivity.java b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoSettingsActivity.java
index 45be3d9f4..04c68f8f2 100644
--- a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoSettingsActivity.java
+++ b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoSettingsActivity.java
@@ -54,7 +54,6 @@ public class NekoSettingsActivity extends BaseFragment {
private int googlePlayRow;
private int sourceCodeRow;
private int translationRow;
- private int donateRow;
private int about2Row;
@Override
@@ -104,8 +103,6 @@ public class NekoSettingsActivity extends BaseFragment {
presentFragment(new NekoExperimentalSettingsActivity());
} else if (position == channelRow) {
MessagesController.getInstance(currentAccount).openByUserName("NekogramX", this, 1);
- } else if (position == donateRow) {
- Browser.openUrl(getParentActivity(), "https://patreon.com/NekoXDev");
} else if (position == translationRow) {
Browser.openUrl(getParentActivity(), "https://nekox.crowdin.com/nekox");
} else if (position == googlePlayRow) {
@@ -143,11 +140,6 @@ public class NekoSettingsActivity extends BaseFragment {
}
sourceCodeRow = rowCount++;
translationRow = rowCount++;
- if ("release".equals(BuildConfig.BUILD_TYPE)) {
- donateRow = -1;
- } else {
- donateRow = rowCount++;
- }
about2Row = rowCount++;
if (listAdapter != null) {
@@ -253,13 +245,6 @@ public class NekoSettingsActivity extends BaseFragment {
}
break;
}
- case 6: {
- TextDetailSettingsCell textCell = (TextDetailSettingsCell) holder.itemView;
- if (position == donateRow) {
- textCell.setTextAndValue(LocaleController.getString("Donate", R.string.Donate), LocaleController.getString("DonateAbout", R.string.DonateAbout), false);
- }
- break;
- }
}
}
@@ -316,8 +301,6 @@ public class NekoSettingsActivity extends BaseFragment {
return 3;
} else if (position == categoriesRow || position == aboutRow) {
return 4;
- } else if (position == donateRow) {
- return 6;
}
return 2;
}
diff --git a/TMessagesProj/src/main/res/values-zh-rCN/strings_nekox.xml b/TMessagesProj/src/main/res/values-zh-rCN/strings_nekox.xml
index c0d21835f..ea7da9778 100644
--- a/TMessagesProj/src/main/res/values-zh-rCN/strings_nekox.xml
+++ b/TMessagesProj/src/main/res/values-zh-rCN/strings_nekox.xml
@@ -177,4 +177,6 @@
导入私钥
分享我的公钥
禁用振动
+ 忽略内容限制
+ 在本机忽略消息针对 Android 平台的限制. 这可能在未来被服务器禁止, 您需要自行评估在当地的合法性.
diff --git a/TMessagesProj/src/main/res/values/strings_nekox.xml b/TMessagesProj/src/main/res/values/strings_nekox.xml
index 592f4550d..f9944aac5 100644
--- a/TMessagesProj/src/main/res/values/strings_nekox.xml
+++ b/TMessagesProj/src/main/res/values/strings_nekox.xml
@@ -233,5 +233,8 @@
Share My Public Key
Disable Vibration
+ Ignore Content Restrictions
+ Ignores android restrictions on messages locally. This may be banned by the server in the future, and you will need to evaluate the local legality of this option yourself.
+
\ No newline at end of file
diff --git a/bin/publish_play.sh b/bin/publish_play.sh
index 34e61abfb..c2369455d 100755
--- a/bin/publish_play.sh
+++ b/bin/publish_play.sh
@@ -1,3 +1,3 @@
#!/bin/bash
-./gradlew TMessagesProj:publishFullRelease
\ No newline at end of file
+./gradlew TMessagesProj:publishFullPlayRelease
\ No newline at end of file
diff --git a/bin/publish_release.sh b/bin/publish_release.sh
index 80eaf8111..14acf0cfa 100755
--- a/bin/publish_release.sh
+++ b/bin/publish_release.sh
@@ -13,4 +13,5 @@ fi
rm -rf build/release &&
mkdir -p build/release &&
find TMessagesProj/build/outputs/apk -name "*.apk" -exec cp {} build/release \; &&
+rm -f build/release/*-debug.apk &&
ghr -delete -n "$1" "$1" build/release
\ No newline at end of file