diff --git a/.github/workflows/Dockerfile_bundle.yml b/.github/workflows/Dockerfile_bundle.yml index 9e65a61490e..6445369df92 100644 --- a/.github/workflows/Dockerfile_bundle.yml +++ b/.github/workflows/Dockerfile_bundle.yml @@ -45,7 +45,7 @@ jobs: asset_name: ${{ env.ANAME }}${{ env.AARCH }}.apk asset_content_type: application/gzip env: - RNAME: Telegraher 9.33.16 - TNAME: graher_9.33.16_ - ANAME: Telegraher.9.33.16. + RNAME: Telegraher 9.33.17 + TNAME: graher_9.33.17_ + ANAME: Telegraher.9.33.17. AARCH: bundle diff --git a/README_BUILD.md b/README_BUILD.md index 9c222e2ba11..d680ad6aa7f 100644 --- a/README_BUILD.md +++ b/README_BUILD.md @@ -2,6 +2,14 @@ It's very simple +* open `builditbitch.sh` and remove lines from 10 to 17 and from 22 to 27 +* run `docker build -t telegraher-bundle -f Dockerfile_bundle .` +* run `docker run --rm -v "$PWD":/home/source telegraher-bundle` + +That will build graher bundle. + +## GUIDE BELOW IGNORE CAUSE DOCKER FILE AREN'T ADAPTED + * download the repo `git clone https://github.com/nikitasius/Telegraher.git` * build it * you can use official guide `https://core.telegram.org/reproducible-builds` diff --git a/README_CHANGES.md b/README_CHANGES.md index 6f67266b4eb..963f27f49e0 100644 --- a/README_CHANGES.md +++ b/README_CHANGES.md @@ -1,5 +1,15 @@ # Changes +* 9.33.17 + * fixed spoiler bug + * it's because a features you can enable via settings :) + * removed `READ_PHONE_NUMBERS` + * added missing label for photo size slider + * fix hide graher menu + * clean local db fix + * you can clean it now with non-WAL mode & history wipe is included + * graherium - disable emoji status + * lets make 1st brick to remove the premium shit from our grahers! * 9.33.16 * moved on telegram 9.3.3 base * fixed spoilers for medias diff --git a/TMessagesProj/src/main/AndroidManifest.xml b/TMessagesProj/src/main/AndroidManifest.xml index cfbe81f96bf..b79e981d4e5 100644 --- a/TMessagesProj/src/main/AndroidManifest.xml +++ b/TMessagesProj/src/main/AndroidManifest.xml @@ -48,7 +48,6 @@ - @@ -448,12 +447,6 @@ - - - - - - diff --git a/TMessagesProj/src/main/java/com/evildayz/code/telegraher/TelegraherSettingsActivity.java b/TMessagesProj/src/main/java/com/evildayz/code/telegraher/TelegraherSettingsActivity.java index 15614ed48c6..cb474b62acd 100644 --- a/TMessagesProj/src/main/java/com/evildayz/code/telegraher/TelegraherSettingsActivity.java +++ b/TMessagesProj/src/main/java/com/evildayz/code/telegraher/TelegraherSettingsActivity.java @@ -108,6 +108,7 @@ public class TelegraherSettingsActivity extends BaseFragment implements Notifica private int chatSwapToNextChannelRow; private int chatTabsOnForwardRow; private int chatDisableSpoilersRow; + private int chatHideAllInSpoilersRow; private int chatRealForwardedMessageTimeRow; private int chatHideStickersRow; @@ -116,6 +117,7 @@ public class TelegraherSettingsActivity extends BaseFragment implements Notifica private int videoLabelRoundSizeRow; private int videoRoundSizeMultRow; private int videoRoundUseMainCameraRow; + private int photoSizeMaxLabelRow; private int photoSizeMaxRow; private int videoLabelMaxResolutionRow; @@ -138,6 +140,7 @@ public class TelegraherSettingsActivity extends BaseFragment implements Notifica private int graheriumStarrMark; private int graheriumOverrideConnectionSpeedLabelRow; private int graheriumOverrideConnectionSpeed; + private int graheriumDisableEmojiStatus; private int deviceSpoofingLabelRow; private int deviceSpoofingBrand; @@ -196,6 +199,7 @@ public boolean onFragmentCreate() { chatSwapToNextChannelRow = rowCount++; chatTabsOnForwardRow = rowCount++; chatDisableSpoilersRow = rowCount++; + chatHideAllInSpoilersRow = rowCount++; chatRealForwardedMessageTimeRow = rowCount++; chatHideStickersRow = rowCount++; @@ -212,6 +216,7 @@ public boolean onFragmentCreate() { graheriumStarrMark = rowCount++; graheriumOverrideConnectionSpeedLabelRow = rowCount++; graheriumOverrideConnectionSpeed = rowCount++; + graheriumDisableEmojiStatus = rowCount++; gifLabelHDRow = rowCount++; gifHDRow = rowCount++; @@ -223,6 +228,7 @@ public boolean onFragmentCreate() { videoLabelRoundSizeRow = rowCount++; videoRoundSizeMultRow = rowCount++; videoRoundUseMainCameraRow = rowCount++; + photoSizeMaxLabelRow = rowCount++; photoSizeMaxRow = rowCount++; deviceSpoofingLabelRow = rowCount++; @@ -373,6 +379,12 @@ public boolean supportsPredictiveItemAnimations() { enabled = preferences.getBoolean("DisableSpoilers", false); editor.putBoolean("DisableSpoilers", !enabled); editor.apply(); + } else if (position == chatHideAllInSpoilersRow) { + SharedPreferences preferences = MessagesController.getGlobalTelegraherSettings(); + SharedPreferences.Editor editor = preferences.edit(); + enabled = preferences.getBoolean("HideAllInSpoilers", false); + editor.putBoolean("HideAllInSpoilers", !enabled); + editor.apply(); } else if (position == chatRealForwardedMessageTimeRow) { SharedPreferences preferences = MessagesController.getGlobalTelegraherSettings(); SharedPreferences.Editor editor = preferences.edit(); @@ -423,6 +435,12 @@ public boolean supportsPredictiveItemAnimations() { if (!enabled) editor.putBoolean("EnableGraheriumAnimatedStickerOverlays", false); editor.putBoolean("EnableGraheriumVanillaStickerFlow", !enabled); editor.apply(); + } else if (position == graheriumDisableEmojiStatus) { + SharedPreferences preferences = MessagesController.getGlobalTelegraherSettings(); + SharedPreferences.Editor editor = preferences.edit(); + enabled = preferences.getBoolean("GraheriumDisableEmojiStatus", false); + editor.putBoolean("GraheriumDisableEmojiStatus", !enabled); + editor.apply(); } else if (position == gifHDRow) { SharedPreferences preferences = MessagesController.getGlobalTelegraherSettings(); SharedPreferences.Editor editor = preferences.edit(); @@ -609,6 +627,8 @@ public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { headerCell.setText(LocaleController.getString(R.string.THDeviceSpoofingResetDefaultLabelRow)); } else if (position == showLabelTelegraherMenuRow) { headerCell.setText(LocaleController.getString(R.string.THShowLabelTelegraherMenuRow)); + } else if (position == photoSizeMaxLabelRow) { + headerCell.setText(LocaleController.getString(R.string.THPhotoMaxSize)); } break; } @@ -654,6 +674,8 @@ public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { checkCell.setTextAndCheck(LocaleController.getString(R.string.THGraheriumAnimatedStickerOverlays), globalPreps.getBoolean("EnableGraheriumAnimatedStickerOverlays", false), true); } else if (position == graheriumVanillaStickerFlow) { checkCell.setTextAndCheck(LocaleController.getString(R.string.THGraheriumVanillaStickerFlow), globalPreps.getBoolean("EnableGraheriumVanillaStickerFlow", true), true); + } else if (position == graheriumDisableEmojiStatus) { + checkCell.setTextAndCheck(LocaleController.getString(R.string.THGraheriumDisableEmojiStatus), globalPreps.getBoolean("GraheriumDisableEmojiStatus", false), true); } else if (position == uiAppHidePhoneNumberOnLeftPanelRow) { checkCell.setTextAndCheck(LocaleController.getString(R.string.THHidePhoneNumberOnLeftPanel), globalPreps.getBoolean("HidePhoneNumberOnLeftPanel", false), true); } else if (position == chatSBFullRow) { @@ -664,6 +686,8 @@ public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { checkCell.setTextAndCheck(LocaleController.getString(R.string.THEnableTabsOnForward), globalPreps.getBoolean("EnableTabsOnForward", false), true); } else if (position == chatDisableSpoilersRow) { checkCell.setTextAndCheck(LocaleController.getString(R.string.THDisableSpoilers), globalPreps.getBoolean("DisableSpoilers", false), true); + } else if (position == chatHideAllInSpoilersRow) { + checkCell.setTextAndCheck(LocaleController.getString(R.string.THHideAllInSpoilers), globalPreps.getBoolean("HideAllInSpoilers", false), true); } else if (position == chatRealForwardedMessageTimeRow) { checkCell.setTextAndCheck(LocaleController.getString(R.string.THChatRealForwardedMessageTime), globalPreps.getBoolean("RealForwardedMessageTime", true), true); } else if (position == chatHideStickersRow) { @@ -916,6 +940,7 @@ public int getItemViewType(int position) { || position == videoLabelMaxResolutionRow || position == videoLabelRoundBitrateRow || position == videoLabelRoundSizeRow + || position == photoSizeMaxLabelRow ) { return 0; } else if ( @@ -925,9 +950,9 @@ public int getItemViewType(int position) { || position == profileUIDRow || position == profileDCIDRow || position == profileSBRow || position == hardwareDisableVibroRow || position == chatDeleteMarkRow || position == chatEnableMessageHistoryRow || position == accountExtendVanillaRow || position == chatSBFullRow - || position == chatSwapToNextChannelRow || position == chatTabsOnForwardRow || position == chatDisableSpoilersRow || position == chatRealForwardedMessageTimeRow + || position == chatSwapToNextChannelRow || position == chatTabsOnForwardRow || position == chatDisableSpoilersRow || position == chatHideAllInSpoilersRow || position == chatRealForwardedMessageTimeRow || position == chatHideStickersRow - || position == graheriumSpeedUpUpload || position == graheriumSpeedUpDownload || position == graheriumAnimateEveryAvatar || position == graheriumAnimatedStickerOverlays || position == graheriumVanillaStickerFlow + || position == graheriumSpeedUpUpload || position == graheriumSpeedUpDownload || position == graheriumAnimateEveryAvatar || position == graheriumAnimatedStickerOverlays || position == graheriumVanillaStickerFlow || position == graheriumDisableEmojiStatus || position == gifHDRow || position == videoRoundUseMainCameraRow || position == uiAppHidePhoneNumberOnLeftPanelRow ) { diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MessageObject.java b/TMessagesProj/src/main/java/org/telegram/messenger/MessageObject.java index e85cc459cef..c4af3449af6 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/MessageObject.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/MessageObject.java @@ -346,7 +346,8 @@ public int getEmojiOnlyCount() { } public boolean hasMediaSpoilers() { - return !MessagesController.getGlobalTelegraherSettings().getBoolean("DisableSpoilers", false); + if (MessagesController.getGlobalTelegraherSettings().getBoolean("HideAllInSpoilers", false)) return true; + return messageOwner.media != null && messageOwner.media.spoiler && !MessagesController.getGlobalTelegraherSettings().getBoolean("DisableSpoilers", false); } public boolean shouldDrawReactionsInLayout() { diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java b/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java index 5ab5dd80586..3f6cfd2d3fe 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java @@ -1084,7 +1084,7 @@ public void clearLocalDatabase() { SQLitePreparedStatement state6 = null; try { ArrayList dialogsToCleanup = new ArrayList<>(); - + wipeThHistory(); database.executeFast("DELETE FROM reaction_mentions").stepThis().dispose(); database.executeFast("DELETE FROM reaction_mentions_topics").stepThis().dispose(); database.executeFast("DELETE FROM downloading_documents").stepThis().dispose(); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/CacheControlActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/CacheControlActivity.java index 5f52403a5e7..23602684480 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/CacheControlActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/CacheControlActivity.java @@ -1008,7 +1008,7 @@ public void onItemClick(int id) { kaboomDurovItem.setIconColor(Theme.getColor(Theme.key_dialogRedIcon)); kaboomDurovItem.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteRedText)); - switch (MessagesController.getTelegraherSettings(currentAccount).getInt("ShowTelegraherMenu2", 0)) { + switch (MessagesController.getGlobalTelegraherSettings().getInt("ShowTelegraherMenu2", 0)) { case 0: case 2: graherItem = otherItem.addSubItem(graherButtonId, R.drawable.msg_report_xxx, "\uD83C\uDCCF \uD83D\uDD1E \uD83D\uDC6F"); @@ -1338,14 +1338,12 @@ private void clearDatabase() { if (getParentActivity() == null) { return; } - if (MessagesController.getGlobalTelegraherSettings().getBoolean("EnableWALMode", false)) { - progressDialog = new AlertDialog(getParentActivity(), AlertDialog.ALERT_TYPE_SPINNER); - progressDialog.setCanCancel(false); - progressDialog.showDelayed(500); - MessagesController.getInstance(currentAccount).clearQueryTime(); - getMessagesStorage().clearLocalDatabase(); - } else - BulletinFactory.of(this).createCopyBulletin(LocaleController.getString(R.string.PopupDisabled), parentLayout.getLastFragment().getResourceProvider()).show(); + progressDialog = new AlertDialog(getParentActivity(), AlertDialog.ALERT_TYPE_SPINNER); + progressDialog.setCanCancel(false); + progressDialog.showDelayed(500); + MessagesController.getInstance(currentAccount).clearQueryTime(); + getMessagesStorage().clearLocalDatabase(); + }); AlertDialog alertDialog = builder.create(); showDialog(alertDialog); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java index 0f2cef1bf1f..80d2e9aa6c5 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java @@ -6981,7 +6981,7 @@ private void updateRowsIds() { filtersRow = rowCount++; } devicesRow = rowCount++; - switch (MessagesController.getTelegraherSettings(currentAccount).getInt("ShowTelegraherMenu2", 0)) { + switch (MessagesController.getGlobalTelegraherSettings().getInt("ShowTelegraherMenu2", 0)) { case 0: case 1: telegraherRow = rowCount++; @@ -7261,6 +7261,7 @@ private Drawable getPremiumCrossfadeDrawable() { } private Drawable getEmojiStatusDrawable(TLRPC.EmojiStatus emojiStatus, boolean switchable, boolean animated, int a) { + if (MessagesController.getGlobalTelegraherSettings().getBoolean("GraheriumDisableEmojiStatus", false)) return null; if (emojiStatusDrawable[a] == null) { emojiStatusDrawable[a] = new AnimatedEmojiDrawable.SwapAnimatedEmojiDrawable(nameTextView[a], AndroidUtilities.dp(24), a == 0 ? AnimatedEmojiDrawable.CACHE_TYPE_EMOJI_STATUS : AnimatedEmojiDrawable.CACHE_TYPE_KEYBOARD); } diff --git a/TMessagesProj/src/main/res/values-ru/strings.xml b/TMessagesProj/src/main/res/values-ru/strings.xml index b9df02c01cc..5b9125ed463 100644 --- a/TMessagesProj/src/main/res/values-ru/strings.xml +++ b/TMessagesProj/src/main/res/values-ru/strings.xml @@ -72,6 +72,7 @@ Следующий канал при свайпе Вкладки при пересылке Выключить спойлеры + Спрятать всё в спойлеры ID скопирован в буфер DC скопирован в буфер Shadowban менеджер @@ -109,4 +110,6 @@ Размер стикеров Настоящее время пересланного сообщения Скрывать стикеры в чатах + Максимальный размер фото + Убрать emoji из статуса diff --git a/TMessagesProj/src/main/res/values/strings.xml b/TMessagesProj/src/main/res/values/strings.xml index b756fd8b59f..44586524a65 100644 --- a/TMessagesProj/src/main/res/values/strings.xml +++ b/TMessagesProj/src/main/res/values/strings.xml @@ -6120,6 +6120,7 @@ Next channel on swap Tabs on forward Disable spoilers + Hide all in spoilers ID copied to clipboard DC copied to clipboard Shadowban manager @@ -6156,4 +6157,6 @@ Sticker size Real forwarded message time Hide stickers in chats + Max photo size + Disable emoji status diff --git a/gradle.properties b/gradle.properties index f50368492b2..c4d5fd46160 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,8 +13,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true #Sat Mar 12 05:53:50 MSK 2016 -APP_VERSION_NAME=9.33.16 -APP_VERSION_CODE=3026016 +APP_VERSION_NAME=9.33.17 +APP_VERSION_CODE=3026017 APP_PACKAGE=com.evildayz.code.telegraher2 RELEASE_KEY_PASSWORD=android RELEASE_KEY_ALIAS=androidkey