@@ -180,29 +180,30 @@ public void run() {
180180 */
181181 @ Override
182182 protected void onPostExecute (Boolean exportResult ) {
183- if (mContext instanceof Activity ) {
184- if (! exportResult ) {
183+ if (! exportResult ) {
184+ if (mContext instanceof Activity ) {
185185 Toast .makeText (mContext ,
186186 mContext .getString (R .string .toast_export_error , mExportParams .getExportFormat ().name ()),
187187 Toast .LENGTH_LONG ).show ();
188- return ;
189- } else {
190- reportSuccess ();
191188 }
192- }
189+ } else {
190+ if (mContext instanceof Activity )
191+ reportSuccess ();
193192
194- if (mExportParams .shouldDeleteTransactionsAfterExport ()) {
195- Log .i (TAG , "Backup and deleting transactions after export" );
196- backupAndDeleteTransactions ();
193+ if (mExportParams .shouldDeleteTransactionsAfterExport ()) {
194+ Log .i (TAG , "Backup and deleting transactions after export" );
195+ backupAndDeleteTransactions ();
197196
198- //now refresh the respective views
199- if (mContext instanceof AccountsActivity ){
200- AccountsListFragment fragment = ((AccountsActivity ) mContext ).getCurrentAccountListFragment ();
201- if (fragment != null )
202- fragment .refresh ();
203- }
204- if (mContext instanceof TransactionsActivity ){
205- ((TransactionsActivity ) mContext ).refresh ();
197+ //now refresh the respective views
198+ if (mContext instanceof AccountsActivity ){
199+ AccountsListFragment fragment =
200+ ((AccountsActivity ) mContext ).getCurrentAccountListFragment ();
201+ if (fragment != null )
202+ fragment .refresh ();
203+ }
204+ if (mContext instanceof TransactionsActivity ){
205+ ((TransactionsActivity ) mContext ).refresh ();
206+ }
206207 }
207208 }
208209
0 commit comments