Skip to content

Commit da1e53a

Browse files
committed
Invert conditional to avoid negation
1 parent 0a1dbce commit da1e53a

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

app/src/main/java/org/gnucash/android/export/ExportAsyncTask.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,7 @@ public void run() {
180180
*/
181181
@Override
182182
protected void onPostExecute(Boolean exportResult) {
183-
if (!exportResult) {
184-
if (mContext instanceof Activity) {
185-
Toast.makeText(mContext,
186-
mContext.getString(R.string.toast_export_error, mExportParams.getExportFormat().name()),
187-
Toast.LENGTH_LONG).show();
188-
}
189-
} else {
183+
if (exportResult) {
190184
if (mContext instanceof Activity)
191185
reportSuccess();
192186

@@ -195,6 +189,12 @@ protected void onPostExecute(Boolean exportResult) {
195189
backupAndDeleteTransactions();
196190
refreshViews();
197191
}
192+
} else {
193+
if (mContext instanceof Activity) {
194+
Toast.makeText(mContext,
195+
mContext.getString(R.string.toast_export_error, mExportParams.getExportFormat().name()),
196+
Toast.LENGTH_LONG).show();
197+
}
198198
}
199199

200200
if (mContext instanceof Activity) {

0 commit comments

Comments
 (0)