Skip to content

Commit

Permalink
feat: hide proxy entry in title
Browse files Browse the repository at this point in the history
Signed-off-by: Next Alone <[email protected]>
  • Loading branch information
NextAlone committed Oct 14, 2024
1 parent 178eea1 commit fa8e34f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10002,6 +10002,10 @@ private void updateProxyButton(boolean animated, boolean force) {
if (proxyDrawable == null || doneItem != null && doneItem.getVisibility() == View.VISIBLE) {
return;
}
if (Config.hideProxyEntryInTitle) {
proxyItem.setVisibility(View.GONE);
return;
}
boolean showDownloads = false;
for (int i = 0; i < getDownloadController().downloadingFiles.size(); i++) {
if (getFileLoader().isLoadingFile(getDownloadController().downloadingFiles.get(i).getFileName())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public class GeneralSettingActivity extends BaseActivity {
private int disableSharePhoneWithContactByDefaultRow;
private int ignoreUserSpecifiedReplyColorRow;
private int ignoreFolderUnreadCountRow;
private int hideProxyEntryInTitleRow;
private int hideFilterMuteAllRow;

private int devicesRow;
Expand Down Expand Up @@ -398,8 +399,12 @@ else if (position == showBotAPIRow) {
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(Config.hideDialogsFloatingButton);
}
} else if (position == hideProxyEntryInTitleRow) {
Config.toggleHideProxyEntryInTitle();
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(Config.hideProxyEntryInTitle);
}
}

}

@Override
Expand Down Expand Up @@ -467,6 +472,7 @@ protected void updateRows() {
tabsTitleTypeRow = addRow("tabsTitleType");
ignoreFolderUnreadCountRow = addRow("ignoreFolderUnreadCount");
hideFilterMuteAllRow = addRow("hideFilterMuteAll");
hideProxyEntryInTitleRow = addRow();
general2Row = addRow();

devicesRow = addRow();
Expand Down Expand Up @@ -670,6 +676,8 @@ public void onBindViewHolder(RecyclerView.ViewHolder holder, int position, boole
textCell.setTextAndCheck(LocaleController.getString("hideFilterMuteAll", R.string.hideFilterMuteAll), Config.hideFilterMuteAll, true);
} else if (position == hideDialogsFloatingButtonRow) {
textCell.setTextAndCheck(LocaleController.getString("hideDialogsFloatingButton", R.string.hideDialogsFloatingButton), Config.hideDialogsFloatingButton, true);
} else if (position == hideProxyEntryInTitleRow) {
textCell.setTextAndCheck(LocaleController.getString(R.string.hideProxyEntryInTitle), Config.hideProxyEntryInTitle, true);
}
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ object Defines {
@BooleanConfig const val disableAutoPip = "disableAutoPip"
@BooleanConfig const val sendMp4DocumentAsVideo = "sendMp4DocumentAsVideo"
@BooleanConfig const val disableGravityDetectionInVideo = "disableGravityDetectionInVideo"
@BooleanConfig const val hideProxyEntryInTitle = "hideProxyEntryInTitle"

// Drawer List
@BooleanConfig(true) const val showNewGroup = "showNewGroup"
Expand Down
1 change: 1 addition & 0 deletions TMessagesProj/src/main/res/values-zh/strings_nullgram.xml
Original file line number Diff line number Diff line change
Expand Up @@ -376,4 +376,5 @@
<string name="disableAutoPip">禁用自动画中画</string>
<string name="sendMp4DocumentAsVideo">以视频格式发送 MP4 文件</string>
<string name="disableGravityDetectionInVideo">禁用视频重力检测</string>
<string name="hideProxyEntryInTitle">隐藏标题代理入口</string>
</resources>
1 change: 1 addition & 0 deletions TMessagesProj/src/main/res/values/strings_nullgram.xml
Original file line number Diff line number Diff line change
Expand Up @@ -389,4 +389,5 @@
<string name="disableAutoPip">Disable auto PIP</string>
<string name="sendMp4DocumentAsVideo">Send MP4 document as video</string>
<string name="disableGravityDetectionInVideo">Disable gravity detection in video</string>
<string name="hideProxyEntryInTitle">Hide proxy entry in title</string>
</resources>

0 comments on commit fa8e34f

Please sign in to comment.