Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
adbenitez committed Dec 13, 2024
2 parents 5cba1cc + d9db4b8 commit 5ffbc19
Show file tree
Hide file tree
Showing 26 changed files with 473 additions and 373 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# ArcaneChat Android Changelog

## v1.50.3
2024-12

* Add in-chat apps picker to attachments options
* Notify replies and reactions to your messages in muted chats (can be disabled in settings)
* Cache HTTP GET requests (ex. when loading images from HTML messages)
* update to core 1.152.0

## v1.50.2
2024-12

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ android {
useLibrary 'org.apache.http.legacy'

defaultConfig {
versionCode 30000699
versionName "1.50.3"
versionCode 30000700
versionName "1.50.4"

applicationId "chat.delta.lite"
multiDexEnabled true
Expand Down
86 changes: 26 additions & 60 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
with sdkPkgs; [
build-tools-33-0-1
cmdline-tools-latest
ndk-bundle
platform-tools
platforms-android-34
ndk-27-0-11902837
Expand Down
12 changes: 0 additions & 12 deletions jni/dc_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -702,12 +702,6 @@ JNIEXPORT jboolean Java_com_b44t_messenger_DcContext_resendMsgs(JNIEnv *env, job
}


JNIEXPORT jint Java_com_b44t_messenger_DcContext_prepareMsg(JNIEnv *env, jobject obj, jint chat_id, jobject msg)
{
return dc_prepare_msg(get_dc_context(env, obj), chat_id, get_dc_msg(env, msg));
}


JNIEXPORT jint Java_com_b44t_messenger_DcContext_sendMsg(JNIEnv *env, jobject obj, jint chat_id, jobject msg)
{
return dc_send_msg(get_dc_context(env, obj), chat_id, get_dc_msg(env, msg));
Expand Down Expand Up @@ -1588,12 +1582,6 @@ JNIEXPORT jboolean Java_com_b44t_messenger_DcMsg_isForwarded(JNIEnv *env, jobjec
}


JNIEXPORT jboolean Java_com_b44t_messenger_DcMsg_isIncreation(JNIEnv *env, jobject obj)
{
return dc_msg_is_increation(get_dc_msg(env, obj))!=0;
}


JNIEXPORT jboolean Java_com_b44t_messenger_DcMsg_isInfo(JNIEnv *env, jobject obj)
{
return dc_msg_is_info(get_dc_msg(env, obj))!=0;
Expand Down
2 changes: 1 addition & 1 deletion jni/deltachat-core-rust
Submodule deltachat-core-rust updated 54 files
+2 −2 .github/workflows/ci.yml
+61 −1 CHANGELOG.md
+5 −5 Cargo.lock
+2 −2 Cargo.toml
+2 −2 README.md
+1 −1 deltachat-ffi/Cargo.toml
+5 −68 deltachat-ffi/deltachat.h
+0 −31 deltachat-ffi/src/lib.rs
+1 −1 deltachat-jsonrpc/Cargo.toml
+1 −1 deltachat-jsonrpc/typescript/package.json
+1 −1 deltachat-repl/Cargo.toml
+1 −1 deltachat-rpc-client/pyproject.toml
+1 −1 deltachat-rpc-server/Cargo.toml
+1 −1 deltachat-rpc-server/npm-package/package.json
+3 −0 deny.toml
+132 −138 fuzz/Cargo.lock
+0 −4 node/lib/message.ts
+0 −12 node/src/module.c
+0 −1 node/test/test.mjs
+1 −1 package.json
+1 −1 python/pyproject.toml
+1 −33 python/src/deltachat/chat.py
+3 −5 python/tests/test_1_online.py
+0 −107 python/tests/test_2_increation.py
+1 −41 python/tests/test_3_offline.py
+1 −1 release-date.in
+0 −35 src/blob.rs
+99 −176 src/chat.rs
+4 −14 src/contact.rs
+1 −17 src/context.rs
+0 −3 src/ephemeral.rs
+53 −25 src/html.rs
+44 −43 src/imap.rs
+63 −1 src/key.rs
+3 −47 src/message.rs
+12 −9 src/mimefactory.rs
+15 −81 src/mimeparser.rs
+278 −6 src/net/http.rs
+6 −17 src/param.rs
+0 −2 src/pgp.rs
+1 −1 src/quota.rs
+68 −40 src/receive_imf.rs
+86 −17 src/receive_imf/tests.rs
+20 −1 src/scheduler/connectivity.rs
+3 −1 src/securejoin.rs
+1 −1 src/smtp.rs
+1 −1 src/smtp/connect.rs
+23 −1 src/sql.rs
+33 −0 src/sql/migrations.rs
+9 −8 src/stock_str.rs
+18 −0 src/test_utils.rs
+8 −0 test-data/golden/receive_imf_recreate_contact_list_on_missing_messages
+9 −0 test-data/golden/receive_imf_recreate_member_list_on_missing_add_of_self
+305 −0 test-data/message/big_forwarded_with_big_attachment.eml
2 changes: 1 addition & 1 deletion scripts/rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.77.0
1.83.0
2 changes: 2 additions & 0 deletions scripts/update-core.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env bash

set -e # stop on all errors

git submodule update --init --recursive
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/b44t/messenger/DcContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ protected void finalize() throws Throwable {
public native void deleteMsgs (int msg_ids[]);
public native void forwardMsgs (int msg_ids[], int chat_id);
public native boolean resendMsgs (int msg_ids[]);
public native int prepareMsg (int chat_id, DcMsg msg);
public native int sendMsg (int chat_id, DcMsg msg);
public native int sendTextMsg (int chat_id, String text);
public native int sendVideochatInvitation(int chat_id);
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/b44t/messenger/DcMsg.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ public JSONObject getWebxdcInfo () {
public native String getSetupCodeBegin ();
public native String getVideochatUrl ();
public native int getVideochatType ();
public native boolean isIncreation ();
public native void setText (String text);
public native void setSubject (String text);
public native void setHtml (String text);
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/org/thoughtcrime/securesms/ConversationActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
import org.thoughtcrime.securesms.util.ViewUtil;
import org.thoughtcrime.securesms.util.concurrent.AssertedSuccessListener;
import org.thoughtcrime.securesms.util.guava.Optional;
import org.thoughtcrime.securesms.util.views.ProgressDialog;
import org.thoughtcrime.securesms.util.views.Stub;
import org.thoughtcrime.securesms.video.recode.VideoRecoder;
import org.thoughtcrime.securesms.videochat.VideochatUtil;
Expand Down Expand Up @@ -173,6 +174,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
private View composePanel;
private ScaleStableImageView backgroundView;
private MessageRequestsBottomView messageRequestBottomView;
private ProgressDialog progressDialog;

private AttachmentTypeSelector attachmentTypeSelector;
private AttachmentManager attachmentManager;
Expand Down Expand Up @@ -1069,7 +1071,17 @@ protected Void doInBackground(Object... param) {
{
boolean doSend = true;
if (recompress==DcMsg.DC_MSG_VIDEO) {
Util.runOnMain(() -> {
progressDialog = ProgressDialog.show(
ConversationActivity.this,
"",
getString(R.string.one_moment),
true,
false
);
});
doSend = VideoRecoder.prepareVideo(ConversationActivity.this, dcChat.getId(), msg);
Util.runOnMain(() -> progressDialog.dismiss());
}

if (doSend) {
Expand Down
18 changes: 16 additions & 2 deletions src/main/java/org/thoughtcrime/securesms/WebxdcActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE
private DcMsg dcAppMsg;
private String baseURL;
private String sourceCodeUrl = "";
private String selfAddr = "";
private String selfAddr;
private int sendUpdateMaxSize;
private int sendUpdateInterval;
private boolean internetAccess = false;
private boolean hideActionBar = false;

Expand Down Expand Up @@ -203,7 +205,9 @@ public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathC
// this is needed here because if the app is opened while already in landscape mode, onConfigurationChanged() is not triggered
setScreenMode(getResources().getConfiguration());
}
selfAddr = JsonUtils.optString(info, "self_addr");
selfAddr = info.optString("self_addr");
sendUpdateMaxSize = info.optInt("send_update_max_size");
sendUpdateInterval = info.optInt("send_update_interval");

toggleFakeProxy(!internetAccess);

Expand Down Expand Up @@ -509,6 +513,16 @@ public boolean isCommunity() {
return dcContext.isCommunity();
}

@JavascriptInterface
public int sendUpdateMaxSize() {
return WebxdcActivity.this.sendUpdateMaxSize;
}

@JavascriptInterface
public int sendUpdateInterval() {
return WebxdcActivity.this.sendUpdateInterval;
}

@JavascriptInterface
public String selfAddr() {
if (dcContext.isCommunity() && !TextUtils.isEmpty(dcContext.getCommunityUser())) {
Expand Down
25 changes: 14 additions & 11 deletions src/main/java/org/thoughtcrime/securesms/WebxdcStoreActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.thoughtcrime.securesms.providers.PersistentBlobProvider;
import org.thoughtcrime.securesms.util.MediaUtil;
import org.thoughtcrime.securesms.util.Prefs;
import org.thoughtcrime.securesms.util.Util;

import java.io.ByteArrayInputStream;
import java.util.HashMap;
Expand Down Expand Up @@ -53,17 +54,19 @@ protected void onCreate(Bundle state, boolean ready) {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
String ext = MediaUtil.getFileExtensionFromUrl(Uri.parse(url).getPath());
if ("xdc".equals(ext)) {
try {
HttpResponse httpResponse = rpc.getHttpResponse(dcContext.getAccountId(), url);
Uri uri = PersistentBlobProvider.getInstance().create(WebxdcStoreActivity.this, httpResponse.getBlob(), "application/octet-stream", "app.xdc");
Intent intent = new Intent();
intent.setData(uri);
setResult(Activity.RESULT_OK, intent);
finish();
} catch (RpcException e) {
e.printStackTrace();
Toast.makeText(WebxdcStoreActivity.this, "Error: " + e.getMessage(), Toast.LENGTH_LONG).show();
}
Util.runOnAnyBackgroundThread(() -> {
try {
HttpResponse httpResponse = rpc.getHttpResponse(dcContext.getAccountId(), url);
Uri uri = PersistentBlobProvider.getInstance().create(WebxdcStoreActivity.this, httpResponse.getBlob(), "application/octet-stream", "app.xdc");
Intent intent = new Intent();
intent.setData(uri);
setResult(Activity.RESULT_OK, intent);
finish();
} catch (RpcException e) {
e.printStackTrace();
Util.runOnMain(() -> Toast.makeText(WebxdcStoreActivity.this, "Error: " + e.getMessage(), Toast.LENGTH_LONG).show());
}
});
} else {
WebViewActivity.openUrlInBrowser(WebxdcStoreActivity.this, url);
}
Expand Down
Loading

0 comments on commit 5ffbc19

Please sign in to comment.