Fix BotConfiguration.copy

This commit is contained in:
Him188 2021-02-07 13:12:40 +08:00
parent cbf151b24d
commit f27e42d225

View File

@ -455,17 +455,24 @@ public open class BotConfiguration { // open for Java
public fun copy(): BotConfiguration {
return BotConfiguration().also { new ->
new.botLoggerSupplier = botLoggerSupplier
new.networkLoggerSupplier = networkLoggerSupplier
new.deviceInfo = deviceInfo
// To structural order
new.workingDir = workingDir
new.json = json
new.parentCoroutineContext = parentCoroutineContext
new.heartbeatPeriodMillis = heartbeatPeriodMillis
new.heartbeatTimeoutMillis = heartbeatTimeoutMillis
new.firstReconnectDelayMillis = firstReconnectDelayMillis
new.reconnectPeriodMillis = reconnectPeriodMillis
new.reconnectionRetryTimes = reconnectionRetryTimes
new.autoReconnectOnForceOffline = autoReconnectOnForceOffline
new.loginSolver = loginSolver
new.protocol = protocol
new.highwayUploadCoroutineCount = highwayUploadCoroutineCount
new.deviceInfo = deviceInfo
new.botLoggerSupplier = botLoggerSupplier
new.networkLoggerSupplier = networkLoggerSupplier
new.friendListCache = friendListCache
new.groupMemberListCache = groupMemberListCache
}
}