mirror of https://github.com/M66B/FairEmail.git
AI: prevent empty text
This commit is contained in:
parent
65e214fc47
commit
50f16d93ac
|
@ -43,8 +43,8 @@ public class AI {
|
||||||
}
|
}
|
||||||
|
|
||||||
static String completeChat(Context context, long id, CharSequence body) throws JSONException, IOException {
|
static String completeChat(Context context, long id, CharSequence body) throws JSONException, IOException {
|
||||||
if (body == null || body.length() == 0)
|
if (body == null || TextUtils.isEmpty(body.toString().trim()))
|
||||||
return null;
|
body = "?";
|
||||||
|
|
||||||
if (OpenAI.isAvailable(context)) {
|
if (OpenAI.isAvailable(context)) {
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
|
|
Loading…
Reference in New Issue