Skip to content

Commit

Permalink
[Feat]: 资源弹窗菜单修改
Browse files Browse the repository at this point in the history
  • Loading branch information
why committed Mar 20, 2024
1 parent 008a369 commit 570b208
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,15 @@ class MagnetActivity : BaseListActivity<AnimeMagnetEntity.Resource, MagnetViewMo
title = "资源详情",
items = listOf(
"复制磁链",
"复制完整磁链",
"复制发布来源",
"打开方式",
"磁链资源预览"
),
onItemClick = { _, which ->
when (which) {
0 -> copyText(resource.magnet.orEmpty())
1 -> copyText(resource.magnet.orEmpty())
2 -> copyText(resource.pageUrl.orEmpty())
3 -> {
1 -> copyText(resource.pageUrl.orEmpty())
2 -> {
runCatching {
val intent = Intent(Intent.ACTION_VIEW)
intent.setData(Uri.parse(resource.magnet.orEmpty()))
Expand All @@ -137,7 +135,7 @@ class MagnetActivity : BaseListActivity<AnimeMagnetEntity.Resource, MagnetViewMo
}
}
// 磁力预览
4 -> {
3 -> {
val magnetHash = resource.magnet.orEmpty().magnetHash()
RouteHelper.jumpWeb(
url = "https://beta.magnet.pics/m/$magnetHash",
Expand Down

0 comments on commit 570b208

Please sign in to comment.