Fixed crash

This commit is contained in:
M66B 2020-07-03 23:04:15 +02:00
parent e2aa040032
commit 95b5c71cf3
1 changed files with 11 additions and 12 deletions

View File

@ -4303,21 +4303,20 @@ public class FragmentCompose extends FragmentBase {
}
} else {
int mid;
if (action == R.id.action_undo)
mid = R.string.title_undo;
else if (action == R.id.action_redo)
mid = R.string.title_redo;
else
mid = R.string.title_draft_saved;
final String msg = getString(mid) +
(BuildConfig.DEBUG ? ":" + draft.revision : "");
Handler handler = new Handler(context.getMainLooper());
handler.post(new Runnable() {
public void run() {
int id;
if (action == R.id.action_undo)
id = R.string.title_undo;
else if (action == R.id.action_redo)
id = R.string.title_redo;
else
id = R.string.title_draft_saved;
ToastEx.makeText(context,
getString(id) +
(BuildConfig.DEBUG ? ":" + draft.revision : ""),
Toast.LENGTH_LONG).show();
ToastEx.makeText(context, msg, Toast.LENGTH_LONG).show();
}
});
}