Remove toast messages when posting a message

This commit is contained in:
tom79 2019-07-06 18:02:05 +02:00
parent a20fd632be
commit b4aec0c818
2 changed files with 10 additions and 4 deletions

View File

@ -2320,9 +2320,12 @@ public class TootActivity extends BaseActivity implements UploadStatusDelegate,
toot_sensitive.setVisibility(View.GONE);
currentToId = -1;
if(apiResponse.getError() == null) {
if (scheduledstatus == null && !isScheduled)
Toasty.success(TootActivity.this, getString(R.string.toot_sent), Toast.LENGTH_LONG).show();
else
if (scheduledstatus == null && !isScheduled) {
boolean display_confirm = sharedpreferences.getBoolean(Helper.SET_DISPLAY_CONFIRM, true);
if( display_confirm){
Toasty.success(TootActivity.this, getString(R.string.toot_sent), Toast.LENGTH_LONG).show();
}
}else
Toasty.success(TootActivity.this, getString(R.string.toot_scheduled), Toast.LENGTH_LONG).show();
}else {
if(apiResponse.getError().getStatusCode() == -33)

View File

@ -499,7 +499,10 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
}
if(apiResponse.getError() == null) {
Toasty.success(context, context.getString(R.string.toot_sent), Toast.LENGTH_LONG).show();
boolean display_confirm = sharedpreferences.getBoolean(Helper.SET_DISPLAY_CONFIRM, true);
if( display_confirm){
Toasty.success(context, context.getString(R.string.toot_sent), Toast.LENGTH_LONG).show();
}
}else {
if(apiResponse.getError().getStatusCode() == -33)
Toasty.info(context, context.getString(R.string.toast_toot_saved_error), Toast.LENGTH_LONG).show();