mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-10 02:52:35 +02:00
Show DVM Status
Limitation: This will only show the first reply from the DVM, if mutliple status updates follow they will be ignored.
This commit is contained in:
@@ -122,26 +122,27 @@ fun RenderNostrNIP90ContentDiscoveryScreen(
|
|||||||
thread.join()
|
thread.join()
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO 2 Get the latest event from the statusFeedViewModel
|
// TODO this shows the status but there might be a better way
|
||||||
// TODO How do we extract the latest event.content (or event.status) from statusFeedViewModel
|
|
||||||
// TODO We want to update dvmStatus with the content of the latest Status event
|
|
||||||
var dvmStatus = "DVM is processing..."
|
var dvmStatus = "DVM is processing..."
|
||||||
|
val thread =
|
||||||
|
Thread {
|
||||||
|
println(dvmStatus)
|
||||||
|
while (resultFeedViewModel.localFilter.feed().isEmpty()) {
|
||||||
|
try {
|
||||||
|
if (statusFeedViewModel.localFilter.feed().isNotEmpty()) {
|
||||||
|
statusFeedViewModel.localFilter.feed()[0].event?.let { dvmStatus = it.content() }
|
||||||
|
println(dvmStatus)
|
||||||
|
break
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* if (statusFeedViewModel.localFilter.feed().isNotEmpty()) {
|
thread.start()
|
||||||
statusFeedViewModel.localFilter.feed()[0].event?.let { Text(text = it.content()) }
|
thread.join()
|
||||||
} else {
|
|
||||||
Text(text = "Nah")
|
|
||||||
}
|
|
||||||
|
|
||||||
DVMStatusView(
|
|
||||||
statusFeedViewModel,
|
|
||||||
null,
|
|
||||||
enablePullRefresh = false,
|
|
||||||
accountViewModel = accountViewModel,
|
|
||||||
nav = nav,
|
|
||||||
)*/
|
|
||||||
|
|
||||||
// Text(text = dvminfo)
|
|
||||||
|
|
||||||
HorizontalPager(state = pagerState) {
|
HorizontalPager(state = pagerState) {
|
||||||
RefresheableBox(resultFeedViewModel, false) {
|
RefresheableBox(resultFeedViewModel, false) {
|
||||||
|
Reference in New Issue
Block a user