mirror of
https://github.com/DrKLO/Telegram.git
synced 2024-12-22 06:25:14 +01:00
Update to 4.2.1
This commit is contained in:
parent
7fcd94d5c9
commit
c92ecf973c
4 changed files with 35 additions and 29 deletions
|
@ -90,7 +90,7 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
defaultConfig.versionCode = 1040
|
||||
defaultConfig.versionCode = 1043
|
||||
|
||||
sourceSets.debug {
|
||||
manifest.srcFile 'config/debug/AndroidManifest.xml'
|
||||
|
@ -162,7 +162,7 @@ android {
|
|||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 25
|
||||
versionName "4.2.0"
|
||||
versionName “4.2.1”
|
||||
|
||||
externalNativeBuild {
|
||||
ndkBuild {
|
||||
|
|
|
@ -11,7 +11,7 @@ package org.telegram.messenger;
|
|||
public class BuildVars {
|
||||
public static boolean DEBUG_VERSION = false;
|
||||
public static boolean DEBUG_PRIVATE_VERSION = false;
|
||||
public static int BUILD_VERSION = 1042;
|
||||
public static int BUILD_VERSION = 1043;
|
||||
public static String BUILD_VERSION_STRING = "4.2";
|
||||
public static int APP_ID = 0; //obtain your own APP_ID at https://core.telegram.org/api/obtaining_api_id
|
||||
public static String APP_HASH = ""; //obtain your own APP_HASH at https://core.telegram.org/api/obtaining_api_id
|
||||
|
|
|
@ -581,16 +581,17 @@ public class FileLoadOperation {
|
|||
RequestInfo delayedRequestInfo = delayedRequestInfos.get(a);
|
||||
if (downloadedBytes == delayedRequestInfo.offset) {
|
||||
delayedRequestInfos.remove(a);
|
||||
processRequestResult(delayedRequestInfo, null);
|
||||
if (delayedRequestInfo.response != null) {
|
||||
delayedRequestInfo.response.disableFree = false;
|
||||
delayedRequestInfo.response.freeResources();
|
||||
} else if (delayedRequestInfo.responseWeb != null) {
|
||||
delayedRequestInfo.responseWeb.disableFree = false;
|
||||
delayedRequestInfo.responseWeb.freeResources();
|
||||
} else if (delayedRequestInfo.responseCdn != null) {
|
||||
delayedRequestInfo.responseCdn.disableFree = false;
|
||||
delayedRequestInfo.responseCdn.freeResources();
|
||||
if (!processRequestResult(delayedRequestInfo, null)) {
|
||||
if (delayedRequestInfo.response != null) {
|
||||
delayedRequestInfo.response.disableFree = false;
|
||||
delayedRequestInfo.response.freeResources();
|
||||
} else if (delayedRequestInfo.responseWeb != null) {
|
||||
delayedRequestInfo.responseWeb.disableFree = false;
|
||||
delayedRequestInfo.responseWeb.freeResources();
|
||||
} else if (delayedRequestInfo.responseCdn != null) {
|
||||
delayedRequestInfo.responseCdn.disableFree = false;
|
||||
delayedRequestInfo.responseCdn.freeResources();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -600,16 +601,16 @@ public class FileLoadOperation {
|
|||
}, null, null, 0, datacenter_id, ConnectionsManager.ConnectionTypeGeneric, true);
|
||||
}
|
||||
|
||||
private void processRequestResult(RequestInfo requestInfo, TLRPC.TL_error error) {
|
||||
private boolean processRequestResult(RequestInfo requestInfo, TLRPC.TL_error error) {
|
||||
if (state != stateDownloading) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
requestInfos.remove(requestInfo);
|
||||
if (error == null) {
|
||||
try {
|
||||
if (downloadedBytes != requestInfo.offset) {
|
||||
delayRequestInfo(requestInfo);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
NativeByteBuffer bytes;
|
||||
if (requestInfo.response != null) {
|
||||
|
@ -623,7 +624,7 @@ public class FileLoadOperation {
|
|||
}
|
||||
if (bytes == null || bytes.limit() == 0) {
|
||||
onFinishLoadingFile(true);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
int currentBytesSize = bytes.limit();
|
||||
if (isCdn) {
|
||||
|
@ -633,7 +634,7 @@ public class FileLoadOperation {
|
|||
if (hash == null) {
|
||||
delayRequestInfo(requestInfo);
|
||||
requestFileOffsets(fileOffset);
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -694,7 +695,7 @@ public class FileLoadOperation {
|
|||
}
|
||||
onFail(false, 0);
|
||||
cacheFileTemp.delete();
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
lastCheckedCdnPart = cdnCheckPart;
|
||||
}
|
||||
|
@ -711,16 +712,17 @@ public class FileLoadOperation {
|
|||
RequestInfo delayedRequestInfo = delayedRequestInfos.get(a);
|
||||
if (downloadedBytes == delayedRequestInfo.offset) {
|
||||
delayedRequestInfos.remove(a);
|
||||
processRequestResult(delayedRequestInfo, null);
|
||||
if (delayedRequestInfo.response != null) {
|
||||
delayedRequestInfo.response.disableFree = false;
|
||||
delayedRequestInfo.response.freeResources();
|
||||
} else if (delayedRequestInfo.responseWeb != null) {
|
||||
delayedRequestInfo.responseWeb.disableFree = false;
|
||||
delayedRequestInfo.responseWeb.freeResources();
|
||||
} else if (delayedRequestInfo.responseCdn != null) {
|
||||
delayedRequestInfo.responseCdn.disableFree = false;
|
||||
delayedRequestInfo.responseCdn.freeResources();
|
||||
if (!processRequestResult(delayedRequestInfo, null)) {
|
||||
if (delayedRequestInfo.response != null) {
|
||||
delayedRequestInfo.response.disableFree = false;
|
||||
delayedRequestInfo.response.freeResources();
|
||||
} else if (delayedRequestInfo.responseWeb != null) {
|
||||
delayedRequestInfo.responseWeb.disableFree = false;
|
||||
delayedRequestInfo.responseWeb.freeResources();
|
||||
} else if (delayedRequestInfo.responseCdn != null) {
|
||||
delayedRequestInfo.responseCdn.disableFree = false;
|
||||
delayedRequestInfo.responseCdn.freeResources();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -775,6 +777,7 @@ public class FileLoadOperation {
|
|||
onFail(false, 0);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void onFail(boolean thread, final int reason) {
|
||||
|
|
|
@ -740,6 +740,9 @@ public class PhotoPaintView extends FrameLayout implements EntityView.EntityView
|
|||
private void removeEntity(EntityView entityView) {
|
||||
if (entityView == currentEntityView) {
|
||||
currentEntityView.deselect();
|
||||
if (editingText) {
|
||||
closeTextEnter(false);
|
||||
}
|
||||
currentEntityView = null;
|
||||
updateSettingsButton();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue