mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
9e70aa7cad
* add new w30 APIs * create the webview, disable internet access, inject deltachat.js * connect deltachat to the webview * promisify api * use msgActionButton to start the w30 apps * cleanup - create observers in onCreate() to avoid memory leak, - derive from WebViewActivity to easier deal with particularities and to saves >100 loc - reorder some methods to reflect lifetimes * make it more clear, which uri-part is 'domain' and which one is 'path' * unify logging * it is 'statusUpdate' not 'stateUpdate'; not sure if promise is needed at the end, we can readd that as needed, simple code for now * use core implementation for status updates * disable debugging enabled by default, streamline code * use same name for InternalJSApi for both, js and java * getStatusUpdates() always return an array * call JSON.stringify() on payload * fix typo, fix equal operator * use shorter function names in js land * adapt to new zipped w30 format * load any file from w30 archives * add fallback if getMimeTypeFromExtension() fails * rename w30 to webxdc * add selfName() * return selfAddr() if selfName() is empty * rename deltachat.js to webxdc.js * observer correct event * rename getBlobFromArchive() to getWebxdcBlob() * show webxdc app name in title bar * swap payload and descr in sendUpdate() (adapt to new core api) * allow user-defined-texts for webxdc apps, make room for icon+name * show webxdc icon and name in chats * render webxdc drafts accordingly * allow configuring drafts * do not destroy webxdc-message to be sent out by removing it via setDraft(null) * fix crash when replying to webxdc messages * add webxdc messages to profile's document tab * hide 'search menu' for webxdc apps * show app summary beside app icon * remove outdated comment * add precautious WebView restrictions * Update src/org/thoughtcrime/securesms/ConversationItem.java Co-authored-by: Asiel Díaz Benítez <adbenitez@nauta.cu> * Update src/org/thoughtcrime/securesms/ConversationItem.java Co-authored-by: Asiel Díaz Benítez <adbenitez@nauta.cu> * Update src/org/thoughtcrime/securesms/ConversationActivity.java Co-authored-by: Hocuri <hocuri@gmx.de> * Webxdc requires at least Android 5 Lollipop see https://github.com/deltachat/deltachat-android/pull/2174#discussion_r785436874 * recognize .xdc files on android10 based on @Hocuri's findings in #2188 Co-authored-by: Simon Laux <mobile.info@simonlaux.de> Co-authored-by: adbenitez <asieldbenitez@gmail.com> Co-authored-by: Asiel Díaz Benítez <adbenitez@nauta.cu> Co-authored-by: Hocuri <hocuri@gmx.de>
76 lines
3.2 KiB
XML
76 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:id="@+id/attachment_editor"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_horizontal"
|
|
android:visibility="gone">
|
|
|
|
<org.thoughtcrime.securesms.components.RemovableEditableMediaView
|
|
android:id="@+id/removable_media_view"
|
|
android:paddingBottom="12dp"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center">
|
|
|
|
<!--
|
|
<org.thoughtcrime.securesms.components.location.SignalMapView
|
|
android:id="@+id/attachment_location"
|
|
android:layout_width="210dp"
|
|
android:layout_height="210dp"
|
|
android:layout_gravity="center_horizontal"
|
|
android:visibility="gone"/>
|
|
-->
|
|
|
|
<org.thoughtcrime.securesms.components.ThumbnailView
|
|
android:id="@+id/attachment_thumbnail"
|
|
android:layout_width="230dp"
|
|
android:layout_height="150dp"
|
|
android:layout_gravity="center_horizontal"
|
|
android:visibility="gone"
|
|
android:contentDescription="@string/menu_add_attachment"
|
|
app:thumbnail_radius="@dimen/message_corner_radius"
|
|
app:minWidth="100dp"
|
|
app:maxWidth="300dp"
|
|
app:minHeight="100dp"
|
|
app:maxHeight="300dp" />
|
|
|
|
<org.thoughtcrime.securesms.components.AudioView
|
|
android:id="@+id/attachment_audio"
|
|
android:layout_width="230dp"
|
|
android:layout_height="wrap_content"
|
|
android:visibility="gone"
|
|
android:layout_marginTop="10dp"
|
|
android:layout_marginLeft="10dp"
|
|
android:layout_marginRight="10dp"
|
|
android:padding="8dp"
|
|
android:background="@drawable/message_bubble_background_sent_alone"/>
|
|
|
|
<org.thoughtcrime.securesms.components.DocumentView
|
|
android:id="@+id/attachment_document"
|
|
android:layout_width="230dp"
|
|
android:layout_height="wrap_content"
|
|
android:visibility="gone"
|
|
android:layout_marginTop="10dp"
|
|
android:layout_marginLeft="10dp"
|
|
android:layout_marginRight="10dp"
|
|
android:padding="8dp"
|
|
android:background="@drawable/message_bubble_background_sent_alone"/>
|
|
|
|
<org.thoughtcrime.securesms.components.WebxdcView
|
|
android:id="@+id/attachment_webxdc"
|
|
android:layout_width="230dp"
|
|
android:layout_height="wrap_content"
|
|
android:visibility="gone"
|
|
android:layout_marginTop="10dp"
|
|
android:layout_marginLeft="10dp"
|
|
android:layout_marginRight="10dp"
|
|
android:padding="8dp"
|
|
android:background="@drawable/message_bubble_background_sent_alone"/>
|
|
|
|
</org.thoughtcrime.securesms.components.RemovableEditableMediaView>
|
|
|
|
</FrameLayout>
|
|
|