pull/1352/head
parent
d03729f964
commit
903f06d10a
@ -1,17 +1,17 @@ |
||||
package io.legado.app.help |
||||
|
||||
object IntentDataHelp { |
||||
object IntentData { |
||||
|
||||
private val bigData: MutableMap<String, Any> = mutableMapOf() |
||||
|
||||
fun putData(data: Any, tag: String = ""): String { |
||||
fun put(data: Any, tag: String = ""): String { |
||||
val key = tag + System.currentTimeMillis() |
||||
bigData[key] = data |
||||
return key |
||||
} |
||||
|
||||
@Suppress("UNCHECKED_CAST") |
||||
fun <T> getData(key: String?): T? { |
||||
fun <T> get(key: String?): T? { |
||||
if (key == null) return null |
||||
val data = bigData[key] |
||||
bigData.remove(key) |
Loading…
Reference in new issue