add more info on current dvm state
This commit is contained in:
+5
-3
@@ -102,7 +102,8 @@ fun RenderNostrNIP90ContentDiscoveryScreen(
|
|||||||
val coroutineScope = rememberCoroutineScope()
|
val coroutineScope = rememberCoroutineScope()
|
||||||
|
|
||||||
// TODO this now shows the first status update but there might be a better way
|
// TODO this now shows the first status update but there might be a better way
|
||||||
var dvmStatus = stringResource(R.string.dvm_no_status)
|
var dvmState = stringResource(R.string.dvm_waiting_status)
|
||||||
|
var dvmNoState = stringResource(R.string.dvm_no_status)
|
||||||
|
|
||||||
val thread =
|
val thread =
|
||||||
Thread {
|
Thread {
|
||||||
@@ -111,9 +112,10 @@ fun RenderNostrNIP90ContentDiscoveryScreen(
|
|||||||
try {
|
try {
|
||||||
if (statusFeedViewModel.localFilter.feed().isNotEmpty()) {
|
if (statusFeedViewModel.localFilter.feed().isNotEmpty()) {
|
||||||
statusFeedViewModel.localFilter.feed()[0].event?.let { dvmStatus = it.content() }
|
statusFeedViewModel.localFilter.feed()[0].event?.let { dvmStatus = it.content() }
|
||||||
println(dvmStatus)
|
println(dvmState)
|
||||||
break
|
break
|
||||||
} else if (count > 1000) {
|
} else if (count > 1000) {
|
||||||
|
dvmState = dvmNoState
|
||||||
// Might not be the best way, but we want to avoid hanging in the loop forever
|
// Might not be the best way, but we want to avoid hanging in the loop forever
|
||||||
} else {
|
} else {
|
||||||
count++
|
count++
|
||||||
@@ -142,7 +144,7 @@ fun RenderNostrNIP90ContentDiscoveryScreen(
|
|||||||
null,
|
null,
|
||||||
onEmpty = {
|
onEmpty = {
|
||||||
// TODO Maybe also show some dvm image/text while waiting for the notes in this custom component
|
// TODO Maybe also show some dvm image/text while waiting for the notes in this custom component
|
||||||
FeedEmptywithStatus(status = dvmStatus) {
|
FeedEmptywithStatus(status = dvmState) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -847,5 +847,6 @@
|
|||||||
|
|
||||||
<string name="load_from_text">From Msg</string>
|
<string name="load_from_text">From Msg</string>
|
||||||
|
|
||||||
|
<string name="dvm_waiting_status">Waiting for DVM to reply</string>
|
||||||
<string name="dvm_no_status">DVM seems not to reply</string>
|
<string name="dvm_no_status">DVM seems not to reply</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user