feat: move subscriptions to new notification method
This commit is contained in:
parent
a39db5ea93
commit
808d4e6bf5
32 changed files with 491 additions and 620 deletions
|
@ -14,24 +14,22 @@ class UrlMedia : Activity() {
|
|||
ThemeManager(this).applyTheme()
|
||||
val data: Uri? = intent?.data
|
||||
val type = data?.pathSegments?.getOrNull(0)
|
||||
if (type == "anime" || type == "manga") {
|
||||
if (type != "user") {
|
||||
var id: Int? = intent?.extras?.getInt("media", 0) ?: 0
|
||||
var isMAL = false
|
||||
var continueMedia = true
|
||||
if (id == 0) {
|
||||
continueMedia = false
|
||||
isMAL = data.host != "anilist.co"
|
||||
id = data.pathSegments?.getOrNull(1)?.toIntOrNull()
|
||||
isMAL = data?.host != "anilist.co"
|
||||
id = data?.pathSegments?.getOrNull(1)?.toIntOrNull()
|
||||
} else loadMedia = id
|
||||
startMainActivity(
|
||||
this,
|
||||
bundleOf("mediaId" to id, "mal" to isMAL, "continue" to continueMedia)
|
||||
)
|
||||
} else if (type == "user") {
|
||||
} else {
|
||||
val username = data.pathSegments?.getOrNull(1)
|
||||
startMainActivity(this, bundleOf("username" to username))
|
||||
} else {
|
||||
startMainActivity(this)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue