Skip to content

Commit 4da817e

Browse files
committed
Fixed: bug causing crash when exporting scheduled transactions when there are scheduled backups present
Re-added option to export all transactions to the export dialog
1 parent 7cd4386 commit 4da817e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

app/src/main/java/org/gnucash/android/export/xml/GncXmlExporter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,9 @@ private void exportScheduledTransactions(XmlSerializer xmlSerializer) throws IOE
481481
String actionUID = cursor.getString(cursor.getColumnIndexOrThrow(ScheduledActionEntry.COLUMN_ACTION_UID));
482482
Account accountUID = mTransactionToTemplateAccountMap.get(actionUID);
483483

484+
if (accountUID == null) //if the action UID does not belong to a transaction we've seen before, skip it
485+
continue;
486+
484487
xmlSerializer.startTag(null, GncXmlHelper.TAG_SCHEDULED_ACTION);
485488
xmlSerializer.attribute(null, GncXmlHelper.ATTR_KEY_VERSION, GncXmlHelper.BOOK_VERSION);
486489
xmlSerializer.startTag(null, GncXmlHelper.TAG_SX_ID);

app/src/main/res/layout/dialog_export.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,9 @@
8888
android:layout_marginLeft="10dp"
8989
android:textAppearance="?android:attr/textAppearanceMedium"
9090
android:text="@string/option_export_all_transactions"
91-
android:visibility="gone"
9291
/>
9392
<TextView android:layout_marginLeft="@dimen/dialog_padding"
9493
android:text="@string/hint_export_choice"
95-
android:visibility="gone"
9694
style="@style/TextAppearance.Hint" />
9795

9896
<CheckBox android:id="@+id/checkbox_post_export_delete"

0 commit comments

Comments
 (0)