Loading app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.kt +14 −9 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ import com.fsck.k9.ui.share.ShareIntentBuilder import com.fsck.k9.ui.withArguments import foundation.e.murenagenie.IAidlMurenaGenieInterface import java.util.Locale import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import org.koin.android.ext.android.inject import timber.log.Timber Loading Loading @@ -369,11 +370,14 @@ class MessageViewFragment : } private fun showAISummarizedText() { lifecycleScope.launch { Toast.makeText(context, "Please wait!!!", Toast.LENGTH_SHORT).show() lifecycleScope.launch(Dispatchers.IO) { val result = iAidlMurenaGenieInterface?.generate("Summarize", messageText) launch(Dispatchers.Main) { AlertDialog.Builder(requireContext()) .setCancelable(false) .setTitle("Summary of the message") .setMessage(result) .setPositiveButton("Done") { dialog, _ -> Loading @@ -382,6 +386,7 @@ class MessageViewFragment : .show() } } } private fun onShowHeaders() { val launchIntent = MessageSourceActivity.createLaunchIntent(requireActivity(), messageReference) Loading Loading
app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.kt +14 −9 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ import com.fsck.k9.ui.share.ShareIntentBuilder import com.fsck.k9.ui.withArguments import foundation.e.murenagenie.IAidlMurenaGenieInterface import java.util.Locale import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import org.koin.android.ext.android.inject import timber.log.Timber Loading Loading @@ -369,11 +370,14 @@ class MessageViewFragment : } private fun showAISummarizedText() { lifecycleScope.launch { Toast.makeText(context, "Please wait!!!", Toast.LENGTH_SHORT).show() lifecycleScope.launch(Dispatchers.IO) { val result = iAidlMurenaGenieInterface?.generate("Summarize", messageText) launch(Dispatchers.Main) { AlertDialog.Builder(requireContext()) .setCancelable(false) .setTitle("Summary of the message") .setMessage(result) .setPositiveButton("Done") { dialog, _ -> Loading @@ -382,6 +386,7 @@ class MessageViewFragment : .show() } } } private fun onShowHeaders() { val launchIntent = MessageSourceActivity.createLaunchIntent(requireActivity(), messageReference) Loading