Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
LiuYi0526 committed Apr 17, 2024
2 parents 0752db7 + 65517f7 commit ef5a06f
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 32 deletions.
1 change: 1 addition & 0 deletions TMessagesProj/jni/build_libvpx_clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function build_one {
--disable-tools \
--disable-debug \
--disable-neon-asm \
--disable-neon-dotprod \
--disable-unit-tests \
--disable-install-docs \
--enable-realtime-only \
Expand Down
2 changes: 1 addition & 1 deletion TMessagesProj/jni/libvpx
Submodule libvpx updated 378 files
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ index fd3532664..7fcfb1627 100644
@@ -634,41 +598,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(HANDSHAKER_ARGS "-handshaker-path" $<TARGET_FILE:handshaker>)
endif()

-if(FIPS)
- add_custom_target(
- acvp_tests
Expand Down Expand Up @@ -99,7 +98,6 @@ index fd3532664..7fcfb1627 100644
- USES_TERMINAL)
-
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

install(EXPORT OpenSSLTargets
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt
index e940f7d5f..f5221d70d 100644
Expand Down Expand Up @@ -217,7 +215,7 @@ index 0fb532eae..f5cab9807 100644
+++ b/ssl/CMakeLists.txt
@@ -44,21 +44,3 @@ add_library(
add_dependencies(ssl global_target)

target_link_libraries(ssl crypto)
-
-add_executable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
public class BuildVars {

public static final boolean IS_BILLING_UNAVAILABLE = true;
public static boolean DEBUG_VERSION = BuildConfig.BUILD_TYPE.equals("debug");
public static boolean DEBUG_VERSION = true;
public static boolean DEBUG_PRIVATE_VERSION = DEBUG_VERSION;
public static boolean LOGS_ENABLED = DEBUG_PRIVATE_VERSION;
public static boolean USE_CLOUD_STRINGS = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ private void resetItems() {
items.add(new Item(8, LocaleController.getString("Settings", R.string.Settings), settingsIcon));
items.add(new Item(10, LocaleController.getString("Calls", R.string.Calls), callsIcon));
if (NekoConfig.useProxyItem.Bool() && (!NekoConfig.hideProxyByDefault.Bool() || SharedConfig.isProxyEnabled())) {
items.add(new CheckItem(13, LocaleController.getString("Proxy", R.string.Proxy), R.drawable.menu_policy, SharedConfig::isProxyEnabled, () -> {
items.add(new CheckItem(13, LocaleController.getString("Proxy", R.string.Proxy), R.drawable.msg_policy, SharedConfig::isProxyEnabled, () -> {
SharedConfig.setProxyEnable(!SharedConfig.isProxyEnabled());
return true;
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.util.Property;
import android.util.TypedValue;
import android.view.Gravity;
Expand All @@ -24,6 +23,7 @@
import org.telegram.messenger.R;
import org.telegram.ui.ActionBar.Theme;
import org.telegram.ui.Components.AnimationProperties;
import org.telegram.ui.Components.BackupImageView;
import org.telegram.ui.Components.CubicBezierInterpolator;
import org.telegram.ui.Components.LayoutHelper;
import org.telegram.ui.Components.Switch;
Expand All @@ -32,6 +32,7 @@

public class DrawerActionCheckCell extends FrameLayout {

private BackupImageView imageView;
private TextView textView;
public Switch checkBox;
private int height = 48;
Expand All @@ -56,26 +57,24 @@ public Float get(DrawerActionCheckCell object) {
};

public DrawerActionCheckCell(Context context) {
this(context, 21);
}

public DrawerActionCheckCell(Context context, int padding) {
super(context);

imageView = new BackupImageView(context);
imageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_menuItemIcon), PorterDuff.Mode.SRC_IN));

textView = new TextView(context);
textView.setTextColor(Theme.getColor(Theme.key_chats_menuItemText));
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 15);
textView.setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL);
textView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
textView.setLines(1);
textView.setMaxLines(1);
textView.setSingleLine(true);

addView(textView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.LEFT | Gravity.TOP, padding, 0, 70, 0));
textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT);

checkBox = new Switch(context);
checkBox.setColors(Theme.key_switchTrack, Theme.key_switchTrackChecked, Theme.key_windowBackgroundWhite, Theme.key_windowBackgroundWhite);
addView(checkBox, LayoutHelper.createFrame(37, 20, Gravity.RIGHT | Gravity.CENTER_VERTICAL, 22, 0, 22, 0));

addView(imageView, LayoutHelper.createFrame(24, 24, Gravity.LEFT | Gravity.TOP, 19, 12, 0, 0));
addView(checkBox, LayoutHelper.createFrame(37, 20, Gravity.RIGHT | Gravity.TOP, 0, 14, 16, 0));
int textViewRightMargin = 16 + 37 + 16;
addView(textView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.LEFT | Gravity.TOP, 72, 0, textViewRightMargin, 0));

setClipChildren(false);
}
Expand Down Expand Up @@ -131,15 +130,8 @@ public void setOnCheckClickListener(View.OnClickListener listener) {

public void setTextAndValueAndCheck(String text, int resId, String value, boolean checked, boolean multiline, boolean divider) {
textView.setText(text);
Drawable drawable = getResources().getDrawable(resId).mutate();
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_menuItemIcon), PorterDuff.Mode.SRC_IN));
textView.setCompoundDrawablePadding(AndroidUtilities.dp(29));
textView.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null);
imageView.setImageResource(resId);
checkBox.setChecked(checked, false);
LayoutParams layoutParams = (LayoutParams) textView.getLayoutParams();
layoutParams.height = LayoutParams.WRAP_CONTENT;
layoutParams.topMargin = AndroidUtilities.dp(10);
textView.setLayoutParams(layoutParams);
setWillNotDraw(!divider);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12687,7 +12687,7 @@ private void setIsAboutToSwitchToIndex(int index, boolean init, boolean animated
}
newMessageObject = imagesArr.get(switchingToIndex);
newMessageObject.updateTranslation();
isVideo = newMessageObject.isVideo();
isVideo = newMessageObject.isVideo() || (newMessageObject.isGif() && NekoConfig.takeGIFasVideo.Bool());

title = FilteredSearchView.createFromInfoString(newMessageObject, opennedFromMedia && !openedFromProfile, 0);
CharSequence subtitle = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11455,7 +11455,7 @@ public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
} else if (position == stickersRow) {
textCell.setTextAndIcon(LocaleController.getString("StickersAndMasks", R.string.StickersAndMasks), R.drawable.msg_sticker, true);
} else if (position == nekoRow) {
textCell.setTextAndIcon(LocaleController.getString("NekoSettings", R.string.NekoSettings), R.drawable.menu_settings, true);
textCell.setTextAndIcon(LocaleController.getString("NekoSettings", R.string.NekoSettings), R.drawable.msg_settings, true);
} else if (position == filtersRow) {
textCell.setTextAndIcon(LocaleController.getString("Filters", R.string.Filters), R.drawable.msg_folders, true);
} else if (position == liteModeRow) {
Expand All @@ -11467,11 +11467,11 @@ public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
} else if (position == policyRow) {
textCell.setTextAndIcon(LocaleController.getString("PrivacyPolicy", R.string.PrivacyPolicy), R.drawable.msg_policy, true);
} else if (position == sendLogsRow) {
textCell.setTextAndIcon(LocaleController.getString("DebugSendLogs", R.string.DebugSendLogs), R.drawable.menu_support2, true);
textCell.setTextAndIcon(LocaleController.getString("DebugSendLogs", R.string.DebugSendLogs), R.drawable.msg_filled_data_sent, true);
} else if (position == sendLastLogsRow) {
textCell.setTextAndIcon(LocaleController.getString("DebugSendLastLogs", R.string.DebugSendLastLogs), R.drawable.baseline_bug_report_24 ,true);
} else if (position == clearLogsRow) {
textCell.setTextAndIcon(LocaleController.getString("DebugClearLogs", R.string.DebugClearLogs), R.drawable.menu_clearcache, switchBackendRow != -1);
textCell.setTextAndIcon(LocaleController.getString("DebugClearLogs", R.string.DebugClearLogs), R.drawable.msg_clearcache, switchBackendRow != -1);
} else if (position == switchBackendRow) {
textCell.setText("Switch Backend", false);
} else if (position == devicesRow) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,15 +490,15 @@ public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
case 2: {
TextCell textCell = (TextCell) holder.itemView;
if (position == chatRow) {
textCell.setTextAndIcon(LocaleController.getString("Chat", R.string.Chat), R.drawable.menu_chats, true);
textCell.setTextAndIcon(LocaleController.getString("Chat", R.string.Chat), R.drawable.msg_discussion, true);
} else if (position == generalRow) {
textCell.setTextAndIcon(LocaleController.getString("General", R.string.General), R.drawable.msg_theme, true);
} else if (position == passcodeRow) {
textCell.setTextAndIcon(LocaleController.getString("PasscodeNeko", R.string.PasscodeNeko), R.drawable.msg_permissions, true);
} else if (position == experimentRow) {
textCell.setTextAndIcon(LocaleController.getString("Experiment", R.string.Experiment), R.drawable.msg_fave, true);
} else if (position == accountRow) {
textCell.setTextAndIcon(LocaleController.getString("Account", R.string.Account), R.drawable.menu_contacts, true);
textCell.setTextAndIcon(LocaleController.getString("Account", R.string.Account), R.drawable.msg_contacts, true);
}
break;
}
Expand Down

0 comments on commit ef5a06f

Please sign in to comment.