Use context looper

This commit is contained in:
M66B
2018-12-20 19:42:38 +01:00
parent 3c4a5a9294
commit fde13733d2
2 changed files with 3 additions and 3 deletions

View File

@@ -1629,7 +1629,7 @@ public class FragmentCompose extends FragmentEx {
EntityOperation.queue(db, draft, EntityOperation.DELETE);
if (!empty) {
Handler handler = new Handler(Looper.getMainLooper());
Handler handler = new Handler(context.getMainLooper());
handler.post(new Runnable() {
public void run() {
Toast.makeText(context, R.string.title_draft_deleted, Toast.LENGTH_LONG).show();
@@ -1639,7 +1639,7 @@ public class FragmentCompose extends FragmentEx {
} else if (action == R.id.action_save || action == R.id.menu_encrypt) {
EntityOperation.queue(db, draft, EntityOperation.ADD);
Handler handler = new Handler(Looper.getMainLooper());
Handler handler = new Handler(context.getMainLooper());
handler.post(new Runnable() {
public void run() {
Toast.makeText(context, R.string.title_draft_saved, Toast.LENGTH_LONG).show();