Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
0b4f53ee
Commit
0b4f53ee
authored
May 10, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimize Face constructor
parent
3238223a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
5 deletions
+22
-5
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/Face.kt
...rc/commonMain/kotlin/net.mamoe.mirai/message/data/Face.kt
+22
-5
No files found.
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/Face.kt
View file @
0b4f53ee
...
...
@@ -12,19 +12,18 @@
package
net.mamoe.mirai.message.data
import
net.mamoe.mirai.utils.PlannedRemoval
import
kotlin.jvm.JvmMultifileClass
import
kotlin.jvm.JvmName
import
kotlin.jvm.JvmSynthetic
/**
* QQ 自带表情
*/
data class
Face
@Suppress
(
"DataClassPrivateConstructor"
)
private
constructor
(
val
id
:
Int
,
private
val
stringValue
:
String
)
:
// used in delegation
data class
Face
(
val
id
:
Int
)
:
// used in delegation
MessageContent
{
constructor
(
id
:
Int
)
:
this
(
id
,
"[mirai:face:$id]"
)
override
fun
toString
():
String
=
stringValue
override
fun
toString
():
String
=
"[mirai:face:$id]"
override
fun
contentToString
():
String
=
"[表情]"
override
fun
equals
(
other
:
Any
?):
Boolean
=
other
is
Face
&&
other
.
id
==
this
.
id
...
...
@@ -232,4 +231,22 @@ private constructor(val id: Int, private val stringValue: String) : // used in d
const
val
shuaitou
:
Int
=
243
const
val
rengou
:
Int
=
244
}
@PlannedRemoval
(
"1.2.0"
)
@Deprecated
(
"for binary compatibility"
,
level
=
DeprecationLevel
.
HIDDEN
)
@Suppress
(
"unused"
,
"UNUSED_PARAMETER"
)
private
constructor
(
id
:
Int
,
stringValue
:
String
)
:
this
(
id
)
@JvmSynthetic
@PlannedRemoval
(
"1.2.0"
)
@Deprecated
(
"for binary compatibility"
,
level
=
DeprecationLevel
.
HIDDEN
)
@Suppress
(
"unused"
,
"UNUSED_PARAMETER"
)
fun
copy
(
id
:
Int
=
this
.
id
,
stringValue
:
String
=
""
)
=
this
.
copy
(
id
=
id
)
@JvmSynthetic
@PlannedRemoval
(
"1.2.0"
)
@Deprecated
(
"for binary compatibility"
,
level
=
DeprecationLevel
.
HIDDEN
)
@Suppress
(
"unused"
,
"UNUSED_PARAMETER"
)
operator
fun
component2
():
String
=
toString
()
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment