fix: remove "channel" label

This reverts commit 8ce5cb2658.
This commit is contained in:
ZavaruKitsu
2023-07-21 17:00:32 +00:00
parent 762e7519ad
commit ffbf90a0fb
4 changed files with 0 additions and 17 deletions

View File

@@ -42,7 +42,6 @@ public class AyuConfig {
public static boolean saveForBots;
public static boolean markReadAfterSend;
public static boolean showFromChannel;
public static boolean keepAliveService;
public static boolean enableAds;
public static boolean localPremium;
@@ -97,7 +96,6 @@ public class AyuConfig {
saveReactions = preferences.getBoolean("saveReactions", true);
// ~ Useful features
showFromChannel = preferences.getBoolean("showFromChannel", true);
keepAliveService = preferences.getBoolean("keepAliveService", true);
enableAds = preferences.getBoolean("enableAds", false);
localPremium = preferences.getBoolean("localPremium", false);

View File

@@ -52,7 +52,6 @@ public class AyuGramPreferencesActivity extends BasePreferencesActivity implemen
private int spyDivider2Row;
private int qolHeaderRow;
private int showFromChannelRow;
private int keepAliveServiceRow;
private int enableAdsRow;
private int localPremiumRow;
@@ -107,7 +106,6 @@ public class AyuGramPreferencesActivity extends BasePreferencesActivity implemen
spyDivider2Row = newRow();
qolHeaderRow = newRow();
showFromChannelRow = newRow();
keepAliveServiceRow = newRow();
enableAdsRow = newRow();
localPremiumRow = newRow();
@@ -250,9 +248,6 @@ public class AyuGramPreferencesActivity extends BasePreferencesActivity implemen
((TextCheckCell) view).setChecked(AyuConfig.saveMessagesHistory);
} else if (position == messageSavingBtnRow) {
presentFragment(new MessageSavingPreferencesActivity());
} else if (position == showFromChannelRow) {
AyuConfig.editor.putBoolean("showFromChannel", AyuConfig.showFromChannel ^= true).apply();
((TextCheckCell) view).setChecked(AyuConfig.showFromChannel);
} else if (position == keepAliveServiceRow) {
AyuConfig.editor.putBoolean("keepAliveService", AyuConfig.keepAliveService ^= true).apply();
((TextCheckCell) view).setChecked(AyuConfig.keepAliveService);
@@ -422,8 +417,6 @@ public class AyuGramPreferencesActivity extends BasePreferencesActivity implemen
textCheckCell.setTextAndCheck(LocaleController.getString(R.string.SaveDeletedMessages), AyuConfig.saveDeletedMessages, true);
} else if (position == saveMessagesHistoryRow) {
textCheckCell.setTextAndCheck(LocaleController.getString(R.string.SaveMessagesHistory), AyuConfig.saveMessagesHistory, false);
} else if (position == showFromChannelRow) {
textCheckCell.setTextAndCheck(LocaleController.getString(R.string.ShowFromChannel), AyuConfig.showFromChannel, true);
} else if (position == keepAliveServiceRow) {
textCheckCell.setTextAndCheck(LocaleController.getString(R.string.KeepAliveService), AyuConfig.keepAliveService, true);
} else if (position == enableAdsRow) {

View File

@@ -5852,10 +5852,6 @@ public class MessageObject {
return messageOwner.from_id instanceof TLRPC.TL_peerChannel && ChatObject.isChannel(chat) && chat.megagroup;
}
public boolean isFromChannel() {
return messageOwner.from_id instanceof TLRPC.TL_peerChannel;
}
public boolean isForwardedChannelPost() {
return messageOwner.from_id instanceof TLRPC.TL_peerChannel && messageOwner.fwd_from != null && messageOwner.fwd_from.channel_post != 0 && messageOwner.fwd_from.saved_from_peer instanceof TLRPC.TL_peerChannel && messageOwner.from_id.channel_id == messageOwner.fwd_from.saved_from_peer.channel_id;
}

View File

@@ -12490,10 +12490,6 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
adminString = adminLabel;
adminWidth = (int) Math.ceil(Theme.chat_adminPaint.measureText(adminString));
nameWidth -= adminWidth;
} else if (AyuConfig.showFromChannel && isMegagroup && currentChat != null && currentMessageObject.isFromChannel()) {
adminString = LocaleController.getString("DiscussChannel", R.string.DiscussChannel);;
adminWidth = (int) Math.ceil(Theme.chat_adminPaint.measureText(adminString));
nameWidth -= adminWidth;
} else {
adminString = null;
adminWidth = 0;