File tree Expand file tree Collapse file tree
app/src/main/java/org/gnucash/android/export Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -193,17 +193,7 @@ protected void onPostExecute(Boolean exportResult) {
193193 if (mExportParams .shouldDeleteTransactionsAfterExport ()) {
194194 Log .i (TAG , "Backup and deleting transactions after export" );
195195 backupAndDeleteTransactions ();
196-
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- }
196+ refreshViews ();
207197 }
208198 }
209199
@@ -537,4 +527,16 @@ private void reportSuccess() {
537527 String .format (mContext .getString (R .string .toast_exported_to ), targetLocation ),
538528 Toast .LENGTH_LONG ).show ();
539529 }
530+
531+ private void refreshViews () {
532+ if (mContext instanceof AccountsActivity ){
533+ AccountsListFragment fragment =
534+ ((AccountsActivity ) mContext ).getCurrentAccountListFragment ();
535+ if (fragment != null )
536+ fragment .refresh ();
537+ }
538+ if (mContext instanceof TransactionsActivity ){
539+ ((TransactionsActivity ) mContext ).refresh ();
540+ }
541+ }
540542}
You can’t perform that action at this time.
0 commit comments