mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2024-11-22 21:36:09 +03:00
fix: subscription
This commit is contained in:
parent
ec489ab491
commit
07e7f0c139
@ -159,16 +159,16 @@ class ProfileManager(private val context: Context) : IProfileManager,
|
|||||||
for (flag in flags) {
|
for (flag in flags) {
|
||||||
val info = flag.split("=")
|
val info = flag.split("=")
|
||||||
when {
|
when {
|
||||||
info[0].contains("upload") -> upload =
|
info[0].contains("upload") && info[1].isNotEmpty() -> upload =
|
||||||
BigDecimal(info[1]).longValueExact()
|
BigDecimal(info[1]).longValueExact()
|
||||||
|
|
||||||
info[0].contains("download") -> download =
|
info[0].contains("download") && info[1].isNotEmpty() -> download =
|
||||||
BigDecimal(info[1]).longValueExact()
|
BigDecimal(info[1]).longValueExact()
|
||||||
|
|
||||||
info[0].contains("total") -> total =
|
info[0].contains("total") && info[1].isNotEmpty() -> total =
|
||||||
BigDecimal(info[1]).longValueExact()
|
BigDecimal(info[1]).longValueExact()
|
||||||
|
|
||||||
info[0].contains("expire") -> {
|
info[0].contains("expire") && info[1].isNotEmpty() -> {
|
||||||
if (info[1].isNotEmpty()) {
|
if (info[1].isNotEmpty()) {
|
||||||
expire = (info[1].toDouble()*1000).toLong()
|
expire = (info[1].toDouble()*1000).toLong()
|
||||||
}
|
}
|
||||||
|
@ -87,26 +87,22 @@ object ProfileProcessor {
|
|||||||
for (flag in flags) {
|
for (flag in flags) {
|
||||||
val info = flag.split("=")
|
val info = flag.split("=")
|
||||||
when {
|
when {
|
||||||
info[0].contains("upload") -> upload =
|
info[0].contains("upload") && info[1].isNotEmpty() -> upload =
|
||||||
info[1].toLong()
|
info[1].toLong()
|
||||||
|
|
||||||
info[0].contains("download") -> download =
|
info[0].contains("download") && info[1].isNotEmpty() -> download =
|
||||||
info[1].toLong()
|
info[1].toLong()
|
||||||
|
|
||||||
info[0].contains("total") -> total =
|
info[0].contains("total") && info[1].isNotEmpty() -> total =
|
||||||
info[1].toLong()
|
info[1].toLong()
|
||||||
|
|
||||||
info[0].contains("expire") -> {
|
info[0].contains("expire") && info[1].isNotEmpty() -> expire =
|
||||||
if (info[1].isNotEmpty()) {
|
|
||||||
expire =
|
|
||||||
(info[1].toDouble() * 1000).toLong()
|
(info[1].toDouble() * 1000).toLong()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
val new = Imported(
|
val new = Imported(
|
||||||
snapshot.uuid,
|
snapshot.uuid,
|
||||||
snapshot.name,
|
snapshot.name,
|
||||||
|
Loading…
Reference in New Issue
Block a user