Skip to content

Commit 37e77f2

Browse files
committed
Fixed a bug with the cancel button in the text translation mode
1 parent acfe85a commit 37e77f2

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

app/src/main/java/nie/translator/rtranslator/voice_translation/_text_translation/TranslationFragment.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ public void onClick(View v) {
332332
@Override
333333
public void onClick(View v) {
334334
outputText.setText("");
335+
global.getTranslator().resetLastOutput();
335336
}
336337
});
337338
}

app/src/main/java/nie/translator/rtranslator/voice_translation/neural_networks/translation/Translator.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,10 @@ public GuiMessage getLastOutputText() {
296296
return lastOutputText;
297297
}
298298

299+
public void resetLastOutput(){
300+
lastOutputText = null;
301+
}
302+
299303
public void resetLastInputOutput(){
300304
lastInputText = null;
301305
lastOutputText = null;

0 commit comments

Comments
 (0)