mirror of https://github.com/Ashinch/ReadYou.git
fix(opml): ignore default group non-null check for service accounts when export (#655)
This commit is contained in:
parent
90859947ac
commit
dfcba9c246
|
@ -61,7 +61,7 @@ class OpmlService @Inject constructor(
|
||||||
*/
|
*/
|
||||||
@Throws(Exception::class)
|
@Throws(Exception::class)
|
||||||
suspend fun saveToString(accountId: Int, attachInfo: Boolean): String {
|
suspend fun saveToString(accountId: Int, attachInfo: Boolean): String {
|
||||||
val defaultGroup = groupDao.queryById(getDefaultGroupId(accountId))!!
|
val defaultGroup = groupDao.queryById(getDefaultGroupId(accountId))
|
||||||
return OpmlWriter().write(
|
return OpmlWriter().write(
|
||||||
Opml(
|
Opml(
|
||||||
"2.0",
|
"2.0",
|
||||||
|
@ -78,7 +78,7 @@ class OpmlService @Inject constructor(
|
||||||
"title" to it.group.name,
|
"title" to it.group.name,
|
||||||
).apply {
|
).apply {
|
||||||
if (attachInfo) {
|
if (attachInfo) {
|
||||||
put("isDefault", (it.group.id == defaultGroup.id).toString())
|
put("isDefault", (it.group.id == defaultGroup?.id).toString())
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
it.feeds.map { feed ->
|
it.feeds.map { feed ->
|
||||||
|
|
Loading…
Reference in New Issue