Skip to content

Commit

Permalink
Merge pull request #143 from nikitasius/noshit_9.3.3
Browse files Browse the repository at this point in the history
Telegraher 9.33.17
  • Loading branch information
nikitasius authored Jan 21, 2023
2 parents b1d2c71 + 7b70d16 commit 7edc8b1
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 26 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/Dockerfile_bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions README_BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
10 changes: 10 additions & 0 deletions README_CHANGES.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 0 additions & 7 deletions TMessagesProj/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
<uses-permission android:name="android.permission.MANAGE_OWN_CALLS"/>
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT"/>
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.READ_PHONE_NUMBERS" />

<uses-permission android:name="com.sec.android.provider.badge.permission.READ"/>
<uses-permission android:name="com.sec.android.provider.badge.permission.WRITE"/>
Expand Down Expand Up @@ -448,12 +447,6 @@
</intent-filter>
</receiver>

<receiver android:name=".RefererReceiver" android:exported="true" android:permission="android.permission.INSTALL_PACKAGES">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>

<receiver android:name=".WearReplyReceiver" android:enabled="true"/>

<receiver android:name=".StopLiveLocationReceiver" android:enabled="true"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -196,6 +199,7 @@ public boolean onFragmentCreate() {
chatSwapToNextChannelRow = rowCount++;
chatTabsOnForwardRow = rowCount++;
chatDisableSpoilersRow = rowCount++;
chatHideAllInSpoilersRow = rowCount++;
chatRealForwardedMessageTimeRow = rowCount++;
chatHideStickersRow = rowCount++;

Expand All @@ -212,6 +216,7 @@ public boolean onFragmentCreate() {
graheriumStarrMark = rowCount++;
graheriumOverrideConnectionSpeedLabelRow = rowCount++;
graheriumOverrideConnectionSpeed = rowCount++;
graheriumDisableEmojiStatus = rowCount++;

gifLabelHDRow = rowCount++;
gifHDRow = rowCount++;
Expand All @@ -223,6 +228,7 @@ public boolean onFragmentCreate() {
videoLabelRoundSizeRow = rowCount++;
videoRoundSizeMultRow = rowCount++;
videoRoundUseMainCameraRow = rowCount++;
photoSizeMaxLabelRow = rowCount++;
photoSizeMaxRow = rowCount++;

deviceSpoofingLabelRow = rowCount++;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down Expand Up @@ -916,6 +940,7 @@ public int getItemViewType(int position) {
|| position == videoLabelMaxResolutionRow
|| position == videoLabelRoundBitrateRow
|| position == videoLabelRoundSizeRow
|| position == photoSizeMaxLabelRow
) {
return 0;
} else if (
Expand All @@ -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
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ public void clearLocalDatabase() {
SQLitePreparedStatement state6 = null;
try {
ArrayList<Long> 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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down Expand Up @@ -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);
}
Expand Down
3 changes: 3 additions & 0 deletions TMessagesProj/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
<string name="THEnableSwapToNextChannel">Следующий канал при свайпе</string>
<string name="THEnableTabsOnForward">Вкладки при пересылке</string>
<string name="THDisableSpoilers">Выключить спойлеры</string>
<string name="THHideAllInSpoilers">Спрятать всё в спойлеры</string>
<string name="ThIdCopied">ID скопирован в буфер</string>
<string name="ThDCCopied">DC скопирован в буфер</string>
<string name="THChatSBManager">Shadowban менеджер</string>
Expand Down Expand Up @@ -109,4 +110,6 @@
<string name="THUIStickerSize">Размер стикеров</string>
<string name="THChatRealForwardedMessageTime">Настоящее время пересланного сообщения</string>
<string name="THChatHideStickers">Скрывать стикеры в чатах</string>
<string name="THPhotoMaxSize">Максимальный размер фото</string>
<string name="THGraheriumDisableEmojiStatus">Убрать emoji из статуса</string>
</resources>
3 changes: 3 additions & 0 deletions TMessagesProj/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6120,6 +6120,7 @@
<string name="THEnableSwapToNextChannel">Next channel on swap</string>
<string name="THEnableTabsOnForward">Tabs on forward</string>
<string name="THDisableSpoilers">Disable spoilers</string>
<string name="THHideAllInSpoilers">Hide all in spoilers</string>
<string name="ThIdCopied">ID copied to clipboard</string>
<string name="ThDCCopied">DC copied to clipboard</string>
<string name="THChatSBManager">Shadowban manager</string>
Expand Down Expand Up @@ -6156,4 +6157,6 @@
<string name="THUIStickerSize">Sticker size</string>
<string name="THChatRealForwardedMessageTime">Real forwarded message time</string>
<string name="THChatHideStickers">Hide stickers in chats</string>
<string name="THPhotoMaxSize">Max photo size</string>
<string name="THGraheriumDisableEmojiStatus">Disable emoji status</string>
</resources>
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7edc8b1

Please sign in to comment.