fix: crash when publishing a scheduled post with the relocated publish button and an error occurs

Goddamnit, at least its fixed
This commit is contained in:
LucasGGamerM
2023-12-17 16:48:30 -03:00
parent f1c55aa5e8
commit 6220a20734

View File

@@ -1293,7 +1293,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
.setPositiveButton(R.string.ok, (a, b)->{}) .setPositiveButton(R.string.ok, (a, b)->{})
.show(); .show();
handlePublishError(null); handlePublishError(null);
publishButton.setEnabled(false); (GlobalUserPreferences.relocatePublishButton ? publishButtonRelocated : publishButton).setEnabled(false);
} }
if (replyTo == null) updateRecentLanguages(); if (replyTo == null) updateRecentLanguages();
@@ -1320,7 +1320,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
result.preview=true; result.preview=true;
wm.removeView(sendingOverlay); wm.removeView(sendingOverlay);
sendingOverlay=null; sendingOverlay=null;
publishButton.setEnabled(true); (GlobalUserPreferences.relocatePublishButton ? publishButtonRelocated : publishButton).setEnabled(true);
V.setVisibilityAnimated(sendProgress, View.GONE); V.setVisibilityAnimated(sendProgress, View.GONE);
InputMethodManager imm=getActivity().getSystemService(InputMethodManager.class); InputMethodManager imm=getActivity().getSystemService(InputMethodManager.class);
imm.hideSoftInputFromWindow(contentView.getWindowToken(), 0); imm.hideSoftInputFromWindow(contentView.getWindowToken(), 0);