Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5019,6 +5019,27 @@ public static float lerp(float a, float b, float f) {
return a + f * (b - a);
}

public static float lerpWithThreshold(float a, float b, float fraction, float startThreshold, float endThreshold) {
if (startThreshold >= endThreshold) {
return (fraction < startThreshold) ? a : b;
}

if (fraction < startThreshold) {
return a;
} else if (fraction >= endThreshold) {
return b;
} else {
float windowDuration = endThreshold - startThreshold;
float progressInWindow = fraction - startThreshold;

float effectiveFraction = progressInWindow / windowDuration;

effectiveFraction = Math.max(0.0f, Math.min(1.0f, effectiveFraction));

return a + effectiveFraction * (b - a);
}
}

public static float lerp(boolean a, boolean b, float f) {
return (a ? 1.0f : 0.0f) + f * ((b ? 1.0f : 0.0f) - (a ? 1.0f : 0.0f));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ public class BuildVars {
public static boolean CHECK_UPDATES = true;
public static boolean NO_SCOPED_STORAGE = Build.VERSION.SDK_INT <= 29;
public static String BUILD_VERSION_STRING = BuildConfig.BUILD_VERSION_STRING;

public static int APP_ID = 4;
public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103";
public static int APP_ID = 29859137;
public static String APP_HASH = "a29a24c7bfec5e8365fc1d207735744e";

// SafetyNet key for Google Identity SDK, set it to empty to disable
public static String SAFETYNET_KEY = "AIzaSyDqt8P-7F7CPCseMkOiVRgb1LY8RN1bvH8";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,13 @@ public void clearImage() {
ImageLoader.getInstance().cancelLoadingForImageReceiver(this, true);
}

public void clearDrawables() {
currentMediaDrawable = null;
currentImageDrawable = null;
currentThumbDrawable = null;
staticThumbDrawable = null;
}

public void onDetachedFromWindow() {
if (!attachedToWindow) {
return;
Expand Down
532 changes: 379 additions & 153 deletions TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions TMessagesProj/src/main/res/drawable/bg_bell_curve.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="180"
android:pivotX="50%"
android:pivotY="50%"
android:toDegrees="90">
<vector
android:width="80dp"
android:height="50dp"
android:viewportWidth="200"
android:viewportHeight="50">

<path
android:fillColor="#000000"
android:pathData="
M 0,60
L 0,50
C 30,50 70,15 100,15
C 130,15 170,50 200,50
L 200,60
Z" />
</vector>
</rotate>
11 changes: 11 additions & 0 deletions TMessagesProj/src/main/res/drawable/filled_message.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">

<path
android:fillColor="#FFFFFF"
android:pathData="M12.0092593,2.75925926 C17.3071019,2.75925926 21.6018519,6.68754166 21.6018519,11.5333236 C21.6018519,16.3791055 17.3071019,20.3073879 12.0092593,20.3073879 C10.5659333,20.3073879 9.19705857,20.0158242 7.96919464,19.493577 C7.60244138,19.7838305 7.2728653,20.0037728 6.98034265,20.1537254 C6.09226794,20.608969 5.495949,20.7715115 4.14424835,20.9135637 C3.77795941,20.9520575 3.53412276,20.6250729 3.81947709,20.339858 C4.45150695,19.708137 4.79254136,18.5767749 4.96614944,17.4895355 C3.38357487,15.9252745 2.41666667,13.8325807 2.41666667,11.5333236 C2.41666667,6.68754166 6.71141666,2.75925926 12.0092593,2.75925926 Z" />
</vector>
58 changes: 58 additions & 0 deletions TMessagesProj_App/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,64 @@
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:760348033671:android:f6afd7b67eae3860",
"android_client_info": {
"package_name": "org.telegram.ashafa"
}
},
"oauth_client": [
{
"client_id": "760348033671-2hh8ebmuflsnjoc0kldkfells9rhtfni.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyA-t0jLPjUt2FxrA8VPK2EiYHcYcboIR6k"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "760348033671-2hh8ebmuflsnjoc0kldkfells9rhtfni.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:760348033671:android:dc022572c167a16c",
"android_client_info": {
"package_name": "org.telegram.ashafa.beta"
}
},
"oauth_client": [
{
"client_id": "760348033671-2hh8ebmuflsnjoc0kldkfells9rhtfni.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyA-t0jLPjUt2FxrA8VPK2EiYHcYcboIR6k"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "760348033671-2hh8ebmuflsnjoc0kldkfells9rhtfni.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:760348033671:android:7396e651423888c3f66e22",
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
# 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_CODE=6047
APP_VERSION_NAME=11.13.0
APP_PACKAGE=org.telegram.messenger
APP_VERSION_CODE=5997
APP_VERSION_NAME=11.12.0
APP_PACKAGE=org.telegram.ashafa
IS_PRIVATE=false
RELEASE_KEY_PASSWORD=android
RELEASE_KEY_ALIAS=androidkey
Expand Down