1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-02 12:33:43 +00:00

Disable FABs on executing task

This commit is contained in:
M66B 2021-02-12 09:43:06 +01:00
parent 383a1f297e
commit b33fe6f82b

View file

@ -2380,6 +2380,16 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
args.putLong("id", message.id);
new SimpleTask<ReplyData>() {
@Override
protected void onPreExecute(Bundle args) {
fabReply.setEnabled(false);
}
@Override
protected void onPostExecute(Bundle args) {
fabReply.setEnabled(true);
}
@Override
protected ReplyData onExecute(Context context, Bundle args) {
long id = args.getLong("id");
@ -2620,6 +2630,16 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
args.putLong("account", account);
new SimpleTask<Boolean>() {
@Override
protected void onPreExecute(Bundle args) {
fabCompose.setEnabled(false);
}
@Override
protected void onPostExecute(Bundle args) {
fabCompose.setEnabled(true);
}
@Override
protected Boolean onExecute(Context context, Bundle args) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);