Merge branch 'main' into adb/webxdc-tts

This commit is contained in:
adb
2025-05-26 15:38:26 +00:00
committed by GitHub
13 changed files with 28 additions and 35 deletions
@@ -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));
}
}
}