Skip to content

Commit

Permalink
Merge pull request #7234 from thundernest/fix_export_settings_backport
Browse files Browse the repository at this point in the history
Don't fail when exporting an identity without a sender name
  • Loading branch information
cketti authored Oct 11, 2023
2 parents f95e22a + 9e7ee72 commit 315cabd
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,11 @@ class SettingsExporter(

// Write name belonging to the identity
val name = prefs[prefix + IDENTITY_NAME_KEY + suffix] as String?
serializer.startTag(null, NAME_ELEMENT)
serializer.text(name)
serializer.endTag(null, NAME_ELEMENT)
if (name != null) {
serializer.startTag(null, NAME_ELEMENT)
serializer.text(name)
serializer.endTag(null, NAME_ELEMENT)
}

// Write email address belonging to the identity
val email = prefs[prefix + IDENTITY_EMAIL_KEY + suffix] as String?
Expand Down

0 comments on commit 315cabd

Please sign in to comment.