mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-03 14:12:25 +08:00
Use inline instead of enum to be in conformity with Android's requirement
This commit is contained in:
parent
7e55c6f342
commit
aeeb3a26e2
@ -44,9 +44,11 @@ data class Profile(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 性别
|
* 性别
|
||||||
*/
|
*/ // 在 Android 中 enum 的使用被严格控制.
|
||||||
enum class Gender {
|
inline class Gender(val value: Byte) {
|
||||||
SECRET,
|
companion object {
|
||||||
MALE,
|
val SECRET = Gender(0)
|
||||||
FEMALE;
|
val MALE = Gender(2)
|
||||||
|
val FEMALE = Gender(1)
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user