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
cb083922
Commit
cb083922
authored
Dec 07, 2019
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant args of BotSession
parent
c78c8ac4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
9 deletions
+3
-9
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/network/BotSession.kt
.../androidMain/kotlin/net/mamoe/mirai/network/BotSession.kt
+2
-5
mirai-core/src/jvmTest/kotlin/mirai/test/packetdebugger/PacketDebugger.kt
...vmTest/kotlin/mirai/test/packetdebugger/PacketDebugger.kt
+1
-4
No files found.
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/network/BotSession.kt
View file @
cb083922
...
@@ -21,11 +21,8 @@ import java.io.InputStream
...
@@ -21,11 +21,8 @@ import java.io.InputStream
*/
*/
@UseExperimental
(
MiraiInternalAPI
::
class
)
@UseExperimental
(
MiraiInternalAPI
::
class
)
actual
class
BotSession
internal
actual
constructor
(
actual
class
BotSession
internal
actual
constructor
(
bot
:
Bot
,
bot
:
Bot
sessionKey
:
SessionKey
,
)
:
BotSessionBase
(
bot
)
{
socket
:
DataPacketSocketAdapter
,
NetworkScope
:
CoroutineScope
)
:
BotSessionBase
(
bot
,
sessionKey
,
socket
,
NetworkScope
)
{
suspend
inline
fun
Image
.
downloadAsStream
():
InputStream
=
download
().
inputStream
()
suspend
inline
fun
Image
.
downloadAsStream
():
InputStream
=
download
().
inputStream
()
suspend
inline
fun
Image
.
downloadAsBitmap
():
Bitmap
=
withContext
(
Dispatchers
.
IO
)
{
downloadAsStream
().
use
{
BitmapFactory
.
decodeStream
(
it
)
}
}
suspend
inline
fun
Image
.
downloadAsBitmap
():
Bitmap
=
withContext
(
Dispatchers
.
IO
)
{
downloadAsStream
().
use
{
BitmapFactory
.
decodeStream
(
it
)
}
}
...
...
mirai-core/src/jvmTest/kotlin/mirai/test/packetdebugger/PacketDebugger.kt
View file @
cb083922
...
@@ -316,10 +316,7 @@ internal object DebugNetworkHandler : BotNetworkHandler<DataPacketSocketAdapter>
...
@@ -316,10 +316,7 @@ internal object DebugNetworkHandler : BotNetworkHandler<DataPacketSocketAdapter>
}
}
override
val
bot
:
Bot
=
Bot
(
qq
,
""
,
coroutineContext
)
override
val
bot
:
Bot
=
Bot
(
qq
,
""
,
coroutineContext
)
override
val
session
=
BotSession
(
override
val
session
=
BotSession
(
bot
)
bot
,
sessionKey
,
socket
,
this
)
override
suspend
fun
login
():
LoginResult
=
LoginResult
.
SUCCESS
override
suspend
fun
login
():
LoginResult
=
LoginResult
.
SUCCESS
...
...
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