Fix DLC Table View not being updated (#3315)

* Fix DLC Table View not being updated

* Fix DLC Table View not being updated
This commit is contained in:
benthecarman 2021-06-22 10:53:15 -05:00 committed by GitHub
parent fafc564da8
commit b8538f0300
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,8 +56,8 @@ class DLCPaneModel(val resultArea: TextArea)(implicit ec: ExecutionContext)
ConsoleCli.exec(GetDLC(dlcId), GlobalData.consoleCliConfig) match {
case Failure(exception) => throw exception
case Success(dlcStatus) =>
dlcs += read[DLCStatus](ujson.read(dlcStatus))
dlcs.find(_.dlcId == dlcId).foreach(dlcs -= _)
dlcs += read[DLCStatus](ujson.read(dlcStatus))
}
}
@ -69,8 +69,8 @@ class DLCPaneModel(val resultArea: TextArea)(implicit ec: ExecutionContext)
toAdd <- toAddF
toRemove <- toRemoveF
} yield {
dlcs ++= toAdd
dlcs --= toRemove
dlcs ++= toAdd
()
}