Skip to content

Commit

Permalink
Merge branch 'dev' into m_10.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Jan 18, 2024
2 parents de2b0e3 + 0d99904 commit 841368b
Show file tree
Hide file tree
Showing 181 changed files with 12,594 additions and 3,014 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Install NDK
if: steps.cache.outputs.cache-hit != 'true'
run: |
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
echo "sdk.dir=${ANDROID_HOME}" > local.properties
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
- name: Native Build
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Install NDK
if: steps.cache.outputs.cache-hit != 'true'
run: |
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
echo "sdk.dir=${ANDROID_HOME}" > local.properties
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
- name: Native Build
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
- name: Install NDK
if: steps.cache.outputs.cache-hit != 'true'
run: |
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
echo "sdk.dir=${ANDROID_HOME}" > local.properties
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
- name: Fix BoringSSL
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
- name: Install NDK
if: steps.cache.outputs.cache-hit != 'true'
run: |
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
echo "sdk.dir=${ANDROID_HOME}" > local.properties
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
- name: Install Golang
Expand Down Expand Up @@ -211,7 +211,7 @@ jobs:
- name: Install NDK
if: steps.cache.outputs.cache-hit != 'true'
run: |
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
echo "sdk.dir=${ANDROID_HOME}" > local.properties
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
- name: Install Rust
Expand Down Expand Up @@ -244,7 +244,7 @@ jobs:
- name: Install NDK
if: steps.cache.outputs.cache-hit != 'true'
run: |
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
echo "sdk.dir=${ANDROID_HOME}" > local.properties
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
- name: Native Build
Expand Down Expand Up @@ -354,7 +354,7 @@ jobs:
uses: android-actions/setup-android@v2
- name: Install NDK
run: |
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
echo "y" | sdkmanager --install "ndk;21.4.7075529" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
echo "sdk.dir=${ANDROID_HOME}" > local.properties
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
- name: Fetch Status
Expand Down
8 changes: 4 additions & 4 deletions TMessagesProj/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import cn.hutool.core.util.RuntimeUtil
apply plugin: "com.android.application"
apply plugin: "kotlin-android"

def verName = "10.5.0"
def verCode = 1152
def verName = "10.6.1"
def verCode = 1154


def officialVer = "10.5.0"
def officialCode = 4228
def officialVer = "10.6.1"
def officialCode = 4275

def serviceAccountCredentialsFile = rootProject.file("service_account_credentials.json")

Expand Down
60 changes: 53 additions & 7 deletions TMessagesProj/jni/tgnet/ApiScheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1210,21 +1210,30 @@ UserStatus *UserStatus::TLdeserialize(NativeByteBuffer *stream, uint32_t constru
case 0x8c703f:
result = new TL_userStatusOffline();
break;
case 0x7bf09fc:
result = new TL_userStatusLastWeek();
break;
case 0x9d05049:
result = new TL_userStatusEmpty();
break;
case 0x77ebc742:
result = new TL_userStatusLastMonth();
break;
case 0xedb93949:
result = new TL_userStatusOnline();
break;
case 0xe26f42f1:
case 0x7b197dc8:
result = new TL_userStatusRecently();
break;
case 0x541a1d1a:
result = new TL_userStatusLastWeek();
break;
case 0x65899777:
result = new TL_userStatusLastMonth();
break;
case 0xe26f42f1:
result = new TL_userStatusRecently_layer171();
break;
case 0x7bf09fc:
result = new TL_userStatusLastWeek_layer171();
break;
case 0x77ebc742:
result = new TL_userStatusLastMonth_layer171();
break;
default:
error = true;
if (LOGS_ENABLED) DEBUG_FATAL("can't parse magic %x in UserStatus", constructor);
Expand All @@ -1243,8 +1252,19 @@ void TL_userStatusOffline::serializeToStream(NativeByteBuffer *stream) {
stream->writeInt32(expires);
}

void TL_userStatusLastWeek_layer171::serializeToStream(NativeByteBuffer *stream) {
stream->writeInt32(constructor);
}

void TL_userStatusLastWeek::serializeToStream(NativeByteBuffer *stream) {
stream->writeInt32(constructor);
flags = by_me ? flags | 1 : flags &~ 1;
stream->writeInt32(flags);
}

void TL_userStatusLastWeek::readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error) {
flags = stream->readInt32(&error);
by_me = (flags & 1) != 0;
}

void TL_userStatusEmpty::serializeToStream(NativeByteBuffer *stream) {
Expand All @@ -1253,6 +1273,17 @@ void TL_userStatusEmpty::serializeToStream(NativeByteBuffer *stream) {

void TL_userStatusLastMonth::serializeToStream(NativeByteBuffer *stream) {
stream->writeInt32(constructor);
flags = by_me ? flags | 1 : flags &~ 1;
stream->writeInt32(flags);
}

void TL_userStatusLastMonth::readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error) {
flags = stream->readInt32(&error);
by_me = (flags & 1) != 0;
}

void TL_userStatusLastMonth_layer171::serializeToStream(NativeByteBuffer *stream) {
stream->writeInt32(constructor);
}

void TL_userStatusOnline::readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error) {
Expand All @@ -1266,6 +1297,21 @@ void TL_userStatusOnline::serializeToStream(NativeByteBuffer *stream) {

void TL_userStatusRecently::serializeToStream(NativeByteBuffer *stream) {
stream->writeInt32(constructor);
flags = by_me ? flags | 1 : flags &~ 1;
stream->writeInt32(flags);
}

void TL_userStatusRecently::readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error) {
flags = stream->readInt32(&error);
by_me = (flags & 1) != 0;
}

void TL_userStatusRecently_layer171::serializeToStream(NativeByteBuffer *stream) {
stream->writeInt32(constructor);
}

void TL_userStatusHidden::serializeToStream(NativeByteBuffer *stream) {
stream->writeInt32(constructor);
}

FileLocation *FileLocation::TLdeserialize(NativeByteBuffer *stream, uint32_t constructor, int32_t instanceNum, bool &error) {
Expand Down
45 changes: 45 additions & 0 deletions TMessagesProj/jni/tgnet/ApiScheme.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,18 @@ class TL_userStatusOffline : public UserStatus {

class TL_userStatusLastWeek : public UserStatus {

public:
static const uint32_t constructor = 0x7bf09fc;

uint32_t flags;
bool by_me;

void serializeToStream(NativeByteBuffer *stream);
void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
};

class TL_userStatusLastWeek_layer171 : public UserStatus {

public:
static const uint32_t constructor = 0x7bf09fc;

Expand All @@ -219,6 +231,19 @@ class TL_userStatusEmpty : public UserStatus {

class TL_userStatusLastMonth : public UserStatus {

public:
static const uint32_t constructor = 0x65899777;

uint32_t flags;
bool by_me;

void serializeToStream(NativeByteBuffer *stream);

void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
};

class TL_userStatusLastMonth_layer171 : public UserStatus {

public:
static const uint32_t constructor = 0x77ebc742;

Expand All @@ -236,12 +261,32 @@ class TL_userStatusOnline : public UserStatus {

class TL_userStatusRecently : public UserStatus {

public:
static const uint32_t constructor = 0x7b197dc8;

uint32_t flags;
bool by_me;

void serializeToStream(NativeByteBuffer *stream);
void readParams(NativeByteBuffer *stream, int32_t instanceNum, bool &error);
};

class TL_userStatusRecently_layer171 : public UserStatus {

public:
static const uint32_t constructor = 0xe26f42f1;

void serializeToStream(NativeByteBuffer *stream);
};

class TL_userStatusHidden : public UserStatus {

public:
static const uint32_t constructor = 0xcf7d64b1;

void serializeToStream(NativeByteBuffer *stream);
};

class FileLocation : public TLObject {

public:
Expand Down
6 changes: 2 additions & 4 deletions TMessagesProj/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -670,15 +670,13 @@

<!--<meta-data android:name="com.google.android.gms.wallet.api.enabled" android:value="true" />-->

<!-- <meta-data android:name="com.google.android.gms.car.notification.SmallIcon" android:resource="@drawable/ic_player" />-->
<!-- <meta-data android:name="com.google.android.gms.car.application" android:resource="@xml/automotive_app_desc" />-->
<meta-data android:name="com.google.android.gms.car.notification.SmallIcon" android:resource="@drawable/ic_player" />
<meta-data android:name="com.google.android.gms.car.application" android:resource="@xml/automotive_app_desc" />

<!--<meta-data android:name="com.google.android.gms.vision.DEPENDENCIES" android:value="face,barcode" />-->

<meta-data android:name="android.max_aspect" android:value="2.5" />

<meta-data android:name="com.google.android.actions" android:resource="@xml/actions" />

</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.util.Log;
import android.util.LongSparseArray;
import android.view.View;
import android.view.ViewPropertyAnimator;
Expand Down Expand Up @@ -51,6 +52,7 @@ public class ChatListItemAnimator extends DefaultItemAnimator {
private ArrayList<MessageObject.GroupedMessages> willChangedGroups = new ArrayList<>();

HashMap<RecyclerView.ViewHolder,Animator> animators = new HashMap<>();
ArrayList<View> thanosViews = new ArrayList<>();

ArrayList<Runnable> runOnAnimationsEnd = new ArrayList<>();
HashMap<Long, Long> groupIdToEnterDelay = new HashMap<>();
Expand Down Expand Up @@ -925,7 +927,12 @@ public void onAnimationEnd(Animator animator) {
animator.removeAllListeners();
restoreTransitionParams(holder.itemView);
if (holder.itemView instanceof ChatMessageCell) {
MessageObject.GroupedMessages group = ((ChatMessageCell) view).getCurrentMessagesGroup();
ChatMessageCell cell = (ChatMessageCell) holder.itemView;
if (cell.makeVisibleAfterChange) {
cell.makeVisibleAfterChange = false;
cell.setVisibility(View.VISIBLE);
}
MessageObject.GroupedMessages group = cell.getCurrentMessagesGroup();
if (group != null) {
group.transitionParams.reset();
}
Expand Down Expand Up @@ -1092,6 +1099,12 @@ private void cancelAnimators() {
animator.cancel();
}
}
if (!thanosViews.isEmpty()) {
ThanosEffect thanosEffect = getThanosEffectContainer.run();
if (thanosEffect != null) {
thanosEffect.kill();
}
}
}

@Override
Expand All @@ -1100,6 +1113,12 @@ public void endAnimation(RecyclerView.ViewHolder item) {
if (animator != null) {
animator.cancel();
}
if (thanosViews.contains(item.itemView)) {
ThanosEffect thanosEffect = getThanosEffectContainer.run();
if (thanosEffect != null) {
thanosEffect.cancel(item.itemView);
}
}
super.endAnimation(item);
restoreTransitionParams(item.itemView);
}
Expand Down Expand Up @@ -1230,6 +1249,12 @@ protected boolean endChangeAnimationIfNecessary(ChangeInfo changeInfo, RecyclerV
if (a != null) {
a.cancel();
}
if (thanosViews.contains(item.itemView)) {
ThanosEffect thanosEffect = getThanosEffectContainer.run();
if (thanosEffect != null) {
thanosEffect.cancel(item.itemView);
}
}

boolean oldItem = false;
if (changeInfo.newHolder == item) {
Expand Down Expand Up @@ -1447,7 +1472,9 @@ protected void animateRemoveImpl(final RecyclerView.ViewHolder holder, boolean t
dispatchRemoveFinished(holder);
dispatchFinishedWhenDone();
}
thanosViews.remove(view);
});
thanosViews.add(view);
} else {
ObjectAnimator animator = ObjectAnimator.ofFloat(view, View.ALPHA, view.getAlpha(), 0f);
dispatchRemoveStarting(holder);
Expand Down Expand Up @@ -1497,7 +1524,9 @@ private void animateRemoveGroupImpl(final ArrayList<RecyclerView.ViewHolder> hol
}
dispatchFinishedWhenDone();
}
thanosViews.removeAll(views);
});
thanosViews.add(views.get(0));
recyclerListView.stopScroll();
}

Expand Down
Loading

0 comments on commit 841368b

Please sign in to comment.