mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Merge branch 'main' into adb/webxdc-tts
This commit is contained in:
@@ -526,6 +526,9 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
} else if (itemId == R.id.menu_show_map) {
|
||||
WebxdcActivity.openMaps(this, chatId);
|
||||
return true;
|
||||
} else if (itemId == R.id.menu_show_apps) {
|
||||
handleProfile(true);
|
||||
return true;
|
||||
} else if (itemId == R.id.menu_search_up) {
|
||||
handleMenuSearchNext(false);
|
||||
return true;
|
||||
@@ -606,10 +609,13 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
}
|
||||
}
|
||||
|
||||
private void handleProfile() {
|
||||
private void handleProfile(boolean showApps) {
|
||||
Intent intent = new Intent(this, ProfileActivity.class);
|
||||
intent.putExtra(ProfileActivity.CHAT_ID_EXTRA, chatId);
|
||||
intent.putExtra(ProfileActivity.FROM_CHAT, true);
|
||||
if (showApps) {
|
||||
intent.putExtra(ProfileActivity.FORCE_TAB_EXTRA, ProfileActivity.TAB_WEBXDC);
|
||||
}
|
||||
startActivity(intent);
|
||||
overridePendingTransition(0, 0);
|
||||
}
|
||||
@@ -863,7 +869,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
buttonToggle.getBackground().invalidateSelf();
|
||||
});
|
||||
|
||||
titleView.setOnClickListener(v -> handleProfile());
|
||||
titleView.setOnClickListener(v -> handleProfile(false));
|
||||
titleView.setOnBackClickedListener(view -> handleReturnToConversationList());
|
||||
|
||||
composeText.setOnKeyListener(composeKeyPressedListener);
|
||||
|
||||
@@ -312,7 +312,7 @@ public class AttachmentManager {
|
||||
} else if (slide.hasDocument()) {
|
||||
if (slide.isWebxdcDocument()) {
|
||||
DcMsg instance = msg != null ? msg : DcHelper.getContext(context).getMsg(slide.dcMsgId);
|
||||
webxdcView.setWebxdc(instance, context.getString(R.string.videochat_tap_to_open));
|
||||
webxdcView.setWebxdc(instance, context.getString(R.string.webxdc_draft_hint));
|
||||
webxdcView.setWebxdcClickListener((v, s) -> {
|
||||
WebxdcActivity.openWebxdcActivity(context, instance);
|
||||
});
|
||||
@@ -409,7 +409,7 @@ public class AttachmentManager {
|
||||
if (slide.isPresent()) {
|
||||
if (slide.get().isWebxdcDocument()) {
|
||||
if (webxdcView != null) {
|
||||
webxdcView.setWebxdc(DcHelper.getContext(context).getMsg(slide.get().dcMsgId), context.getString(R.string.videochat_tap_to_open));
|
||||
webxdcView.setWebxdc(DcHelper.getContext(context).getMsg(slide.get().dcMsgId), context.getString(R.string.webxdc_draft_hint));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M4,8h4L8,4L4,4v4zM10,20h4v-4h-4v4zM4,20h4v-4L4,16v4zM4,14h4v-4L4,10v4zM10,14h4v-4h-4v4zM16,4v4h4L20,4h-4zM10,8h4L14,4h-4v4zM16,14h4v-4h-4v4zM16,20h4v-4h-4v4z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,3 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="960" android:viewportWidth="960" android:width="24dp">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M120,440L120,120L440,120L440,440L120,440ZM120,840L120,520L440,520L440,840L120,840ZM520,440L520,120L840,120L840,440L520,440ZM520,840L520,520L840,520L840,840L520,840ZM200,360L360,360L360,200L200,200L200,360ZM600,360L760,360L760,200L600,200L600,360ZM600,760L760,760L760,600L600,600L600,760ZM200,760L360,760L360,600L200,600L200,760ZM600,360L600,360L600,360L600,360ZM600,600L600,600L600,600L600,600ZM360,600L360,600L360,600L360,600ZM360,360L360,360L360,360L360,360Z"/>
|
||||
</vector>
|
||||
@@ -195,9 +195,9 @@
|
||||
android:id="@+id/webxdc_button"
|
||||
android:layout_width="53dp"
|
||||
android:layout_height="53dp"
|
||||
android:src="@drawable/baseline_apps_24"
|
||||
android:src="@drawable/ic_apps_24"
|
||||
android:scaleType="center"
|
||||
android:contentDescription="@string/webxdc_apps"
|
||||
android:contentDescription="@string/webxdc_app"
|
||||
app:circleColor="@color/apps_icon"
|
||||
/>
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/AttachmentTypeLabel"
|
||||
android:text="@string/webxdc_apps"/>
|
||||
android:text="@string/webxdc_app"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -25,6 +25,11 @@
|
||||
android:visible="false"
|
||||
app:showAsAction="always"/>
|
||||
|
||||
<item android:id="@+id/menu_show_apps"
|
||||
android:title="@string/webxdc_apps"
|
||||
android:icon="@drawable/ic_apps_24"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item android:id="@+id/menu_ephemeral_messages"
|
||||
android:title="@string/ephemeral_messages" />
|
||||
|
||||
@@ -34,7 +39,7 @@
|
||||
<item android:id="@+id/menu_show_map"
|
||||
android:title="@string/tab_map"
|
||||
android:icon="@drawable/ic_map_white_24dp"
|
||||
app:showAsAction="ifRoom" />
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item android:title="@string/menu_archive_chat"
|
||||
android:id="@+id/menu_archive_chat"/>
|
||||
|
||||
@@ -195,6 +195,7 @@
|
||||
<string name="webxdc_apps">Apps</string>
|
||||
<string name="webxdc_store_url">App Picker URL</string>
|
||||
<string name="webxdc_store_url_explain">If set, the URL will be used as the App Picker instead of the default one</string>
|
||||
<string name="webxdc_draft_hint">Tap \"Send\" to share</string>
|
||||
<string name="home">Home</string>
|
||||
<string name="games">Games</string>
|
||||
<string name="tools">Tools</string>
|
||||
|
||||
Reference in New Issue
Block a user