mirror of https://github.com/kami-blue/client
[cleanup] Simplify code: use forEachLine
This commit is contained in:
parent
3542a12d15
commit
ac3380b650
|
@ -33,8 +33,8 @@ object LoginMessage : Module(
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
val fileReader = FileReader(file)
|
val fileReader = FileReader(file)
|
||||||
try {
|
try {
|
||||||
fileReader.readLines().forEach {
|
fileReader.forEachLine {
|
||||||
loginMessages.add(if (it.isNotBlank()) it.trim() else return@forEach)
|
loginMessages.add(if (it.isNotBlank()) it.trim() else return@forEachLine)
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageSendHelper.sendChatMessage("$chatName Loaded ${loginMessages.size} login messages!")
|
MessageSendHelper.sendChatMessage("$chatName Loaded ${loginMessages.size} login messages!")
|
||||||
|
|
Loading…
Reference in New Issue