translation ui changes for message chat view and conversation list view#232
Open
zhangxiaogang wants to merge 1 commit intoeasemob:EaseIMKitfrom
Open
translation ui changes for message chat view and conversation list view#232zhangxiaogang wants to merge 1 commit intoeasemob:EaseIMKitfrom
zhangxiaogang wants to merge 1 commit intoeasemob:EaseIMKitfrom
Conversation
jinanzhuan
reviewed
Nov 29, 2021
Comment on lines
+969
to
+976
| new AlertDialog.Builder(getContext()) | ||
| .setTitle("Using Translate") | ||
| .setMessage("Each translation can be retranslated only once. The translation provided is for reference only.") | ||
| .setPositiveButton("OK", new DialogInterface.OnClickListener() { | ||
| public void onClick(DialogInterface dialog, int which) { | ||
| messageListLayout.reTranslate(message, targetLanguageCode); | ||
| } | ||
| }).show(); |
Contributor
There was a problem hiding this comment.
建议将此dialog移到demo层,并将相应的文案统一(用中文还是英文?),并修改为资源引用的形式。
jinanzhuan
reviewed
Nov 29, 2021
Comment on lines
+802
to
+808
| public void reTranslate(EMMessage message, String languageCode) { | ||
| EMTranslationMessage translationMessage = (EMTranslationMessage) message; | ||
| EMMessage parent = translationMessage.getParent(); | ||
| translationMessage.clearParent();; | ||
| parent.setSubMessage(null); | ||
| translateMessage(parent, languageCode); | ||
| } |
Contributor
There was a problem hiding this comment.
相关逻辑是否可以移到EaseChatLayout中的EaseHandleMessagePresenterImpl中?与发送消息等放到一块,方便将来维护。
jinanzhuan
reviewed
Nov 29, 2021
| EMTranslationResult result = EMTranslationManager.getInstance().getTranslationMessage(message.getMsgId()); | ||
| if(result.getShowTranslation()) { | ||
| EMTranslationMessage translationMessage = EMTranslationMessage.createMessage(message, result); | ||
| message.setSubMessage(translationMessage); |
Contributor
There was a problem hiding this comment.
SDK中是否提供了EMMessage.setSubMessage的接口?
jinanzhuan
reviewed
Nov 29, 2021
Comment on lines
+68
to
+71
|
|
||
| if(message.subMessage() != null) { | ||
| translationContainer.setVisibility(View.VISIBLE); | ||
| EMTranslationResult result = ((EMTranslationMessage)message.subMessage()).getTranslationResult(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.