Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ internal fun List<ListNotificationsNotification>.toDb(
ListNotificationsNotificationReason.Repost -> it.decodeAs<Repost>().subject
ListNotificationsNotificationReason.Like -> it.decodeAs<Like>().subject
}
}?.uri
}.uri
.let {
references[it]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1048,19 +1048,17 @@ internal class MisskeyDataSource(
),
)
}.onSuccess { response ->
if (response.id != null) {
MemoryPagingSource.updateWith<UiList>(
key = listKey,
) {
it
.plus(
UiList(
id = response.id,
title = metaData.title,
platformType = PlatformType.Mastodon,
),
).toImmutableList()
}
MemoryPagingSource.updateWith<UiList>(
key = listKey,
) {
it
.plus(
UiList(
id = response.id,
title = metaData.title,
platformType = PlatformType.Mastodon,
),
).toImmutableList()
}
}
}
Expand Down Expand Up @@ -1219,14 +1217,12 @@ internal class MisskeyDataSource(
listId = listId,
),
)
if (list.id != null) {
MemCacheable.updateWith<ImmutableList<UiList>>(
key = userListsKey(userKey),
) {
it
.plus(list.render())
.toImmutableList()
}
MemCacheable.updateWith<ImmutableList<UiList>>(
key = userListsKey(userKey),
) {
it
.plus(list.render())
.toImmutableList()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ internal class SearchUserPagingSource(
(params.key ?: 0) + params.loadSize
},
)
} ?: run {
return LoadResult.Error(Exception("No data"))
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal class TrendHashtagPagingSource(
)
}.let {
return LoadResult.Page(
data = it ?: emptyList(),
data = it,
prevKey = null,
nextKey = null,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ private fun parseName(status: Account): Element {
"<img src=\"${it.url}\" alt=\"${it.shortcode}\" />",
)
}
return parseHtml(content) as Element
return parseHtml(content)
}

internal fun parseMastodonContent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ private fun parseName(
if (name.isEmpty()) {
return Element("body")
}
return misskeyNameParser.parse(name).toHtml(accountKey, emojis, accountKey.host) as Element
return misskeyNameParser.parse(name).toHtml(accountKey, emojis, accountKey.host)
}

private fun moe.tlaster.mfm.parser.tree.Node.toHtml(
Expand Down