Disable FABs on executing task

This commit is contained in:
M66B 2021-02-12 09:43:06 +01:00
parent 383a1f297e
commit b33fe6f82b
1 changed files with 20 additions and 0 deletions

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);