NSCv3: small fixes

This commit is contained in:
Milos Kozak 2023-02-11 15:48:36 +01:00
parent 7346ae3dd1
commit 1399348c3b
2 changed files with 2 additions and 3 deletions

View file

@ -121,8 +121,8 @@ class NSClientFragment : DaggerFragment(), MenuProvider, PluginFragment {
ID_MENU_CLEAR_LOG -> {
nsClientPlugin?.listLog?.let {
synchronized(it) {
logAdapter.notifyItemRangeRemoved(0, it.size)
it.clear()
_binding?.recyclerview?.swapAdapter(RecyclerViewAdapter(it), true)
}
}
true

View file

@ -67,7 +67,6 @@ class LoadTreatmentsWorker(
nsClientV3Plugin.storeLastLoadedSrvModified()
}
rxBus.send(EventNSClientNewLog("◄ RCV TR END", "No data from ${dateUtil.dateAndTimeAndSecondsString(lastLoaded)}"))
storeDataForDb.storeTreatmentsToDb()
continueLoading = false
}
} else {
@ -77,7 +76,6 @@ class LoadTreatmentsWorker(
nsClientV3Plugin.storeLastLoadedSrvModified()
}
rxBus.send(EventNSClientNewLog("◄ RCV TR END", "No new data from ${dateUtil.dateAndTimeAndSecondsString(lastLoaded)}"))
storeDataForDb.storeTreatmentsToDb()
continueLoading = false
}
}
@ -88,6 +86,7 @@ class LoadTreatmentsWorker(
return Result.failure(workDataOf("Error" to error.localizedMessage))
}
storeDataForDb.storeTreatmentsToDb()
nsClientV3Plugin.lastOperationError = null
return Result.success()
}