Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@
import org.telegram.messenger.Timer;
import org.telegram.messenger.TranslateController;
import org.spacegram.SpaceGramConfig;
import org.spacegram.translator.TranslationHelper;
import org.telegram.messenger.UserConfig;
import org.telegram.messenger.UserObject;
import org.telegram.messenger.Utilities;
Expand Down Expand Up @@ -23875,11 +23874,9 @@ private boolean updateMessagesReplyTranslation(ArrayList<Integer> messageIds, Me


private boolean tryTranslateMessageInline(MessageObject messageObject, String toLang) {
if (SpaceGramConfig.translateProvider == 0 || SpaceGramConfig.translateStyle != 0 || messageObject == null || messageObject.messageOwner == null || TextUtils.isEmpty(messageObject.messageOwner.message)) {
return false;
}
TranslationHelper.translateMessage(messageObject, toLang, currentAccount, null);
return true;
// Force the per-message action to use the same translation UI flow as full chat
// translation, which correctly handles chat dimming lifecycle.
return false;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve inline translation for "On Message" style

This unconditional return false removes the only inline path for per-message translation, so when SpaceGramConfig.translateProvider != 0 and users select the "On Message" translation style, the context action now always falls back to TranslateAlert2 popup flow. That is a behavior regression for a user-configurable feature (style setting is still exposed in SpaceGram settings), not just a dimming lifecycle change.

Useful? React with 👍 / 👎.

}

private long lastTranslationCheck;
Expand Down