Skip to content

Commit

Permalink
fix(opml): ignore default group non-null check for service accounts w…
Browse files Browse the repository at this point in the history
…hen export (#655)
  • Loading branch information
Ashinch committed Mar 21, 2024
1 parent 9085994 commit dfcba9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/me/ash/reader/domain/service/OpmlService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class OpmlService @Inject constructor(
*/
@Throws(Exception::class)
suspend fun saveToString(accountId: Int, attachInfo: Boolean): String {
val defaultGroup = groupDao.queryById(getDefaultGroupId(accountId))!!
val defaultGroup = groupDao.queryById(getDefaultGroupId(accountId))
return OpmlWriter().write(
Opml(
"2.0",
Expand All @@ -78,7 +78,7 @@ class OpmlService @Inject constructor(
"title" to it.group.name,
).apply {
if (attachInfo) {
put("isDefault", (it.group.id == defaultGroup.id).toString())
put("isDefault", (it.group.id == defaultGroup?.id).toString())
}
},
it.feeds.map { feed ->
Expand Down

0 comments on commit dfcba9c

Please sign in to comment.