Skip to content

Commit

Permalink
#46:Bugfix npe; Adopt to new backup api
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxIsV committed Jan 31, 2023
1 parent 09025f1 commit afa54a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ public void setCategoryIndex(int categoryIndex) {


public void submit() {
transaction.setName(transaction.getName().trim());
if (transaction.getName() != null) {
transaction.setName(transaction.getName().trim());
}
transactionDao.updateOrInsertAsync(transaction);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

public class BackupCreator implements IBackupCreator {
@Override
public void writeBackup(@NonNull Context context, @NonNull OutputStream outputStream) {
public boolean writeBackup(@NonNull Context context, @NonNull OutputStream outputStream) {
JsonWriter writer = new JsonWriter(new OutputStreamWriter(outputStream, StandardCharsets.UTF_8));
writer.setIndent("");

Expand Down Expand Up @@ -62,5 +62,6 @@ public void postKey(SQLiteDatabase database) {
} catch (Exception e) {
Log.e("PFA BackupCreator", "Error occurred", e);
}
return true;
}
}

0 comments on commit afa54a3

Please sign in to comment.