Skip to content

Commit

Permalink
automatically translate after changing provider/lang
Browse files Browse the repository at this point in the history
  • Loading branch information
ctwoon committed Aug 19, 2021
1 parent a0ef9d3 commit b3bde3f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/main/java/eu/ctwoon/qtranslate/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ class MainActivity : AppCompatActivity(), TextToSpeech.OnInitListener {
mBuilder.setSingleChoiceItems(listItems, a) { dialogInterface, i ->
ed.putInt("trans", i)
ed.apply()
translate(findViewById<EditText>(R.id.ed).text.toString(), false)
dialogInterface.dismiss()
}

Expand Down Expand Up @@ -204,6 +205,7 @@ class MainActivity : AppCompatActivity(), TextToSpeech.OnInitListener {
mBuilder.setSingleChoiceItems(listItems, mm) { dialogInterface, i ->
ed.putString("lang", listItems[i])
ed.apply()
translate(findViewById<EditText>(R.id.ed).text.toString(), false)
dialogInterface.dismiss()
}

Expand Down

0 comments on commit b3bde3f

Please sign in to comment.