mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-24 06:50:08 +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(
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
enum class Gender {
|
||||
SECRET,
|
||||
MALE,
|
||||
FEMALE;
|
||||
*/ // 在 Android 中 enum 的使用被严格控制.
|
||||
inline class Gender(val value: Byte) {
|
||||
companion object {
|
||||
val SECRET = Gender(0)
|
||||
val MALE = Gender(2)
|
||||
val FEMALE = Gender(1)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user