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()) {
|
||||
val fileReader = FileReader(file)
|
||||
try {
|
||||
fileReader.readLines().forEach {
|
||||
loginMessages.add(if (it.isNotBlank()) it.trim() else return@forEach)
|
||||
fileReader.forEachLine {
|
||||
loginMessages.add(if (it.isNotBlank()) it.trim() else return@forEachLine)
|
||||
}
|
||||
|
||||
MessageSendHelper.sendChatMessage("$chatName Loaded ${loginMessages.size} login messages!")
|
||||
|
|
Loading…
Reference in New Issue