mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-28 17:57:39 +02:00
add DVM not replying message
This commit is contained in:
@@ -31,7 +31,9 @@ import androidx.compose.runtime.getValue
|
|||||||
import androidx.compose.runtime.livedata.observeAsState
|
import androidx.compose.runtime.livedata.observeAsState
|
||||||
import androidx.compose.runtime.rememberCoroutineScope
|
import androidx.compose.runtime.rememberCoroutineScope
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||||
|
import com.vitorpamplona.amethyst.R
|
||||||
import com.vitorpamplona.amethyst.model.LocalCache
|
import com.vitorpamplona.amethyst.model.LocalCache
|
||||||
import com.vitorpamplona.amethyst.service.relays.Client
|
import com.vitorpamplona.amethyst.service.relays.Client
|
||||||
import com.vitorpamplona.amethyst.ui.screen.FeedEmptywithStatus
|
import com.vitorpamplona.amethyst.ui.screen.FeedEmptywithStatus
|
||||||
@@ -100,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 = "DVM is processing..."
|
var dvmStatus = stringResource(R.string.dvm_no_status)
|
||||||
|
|
||||||
val thread =
|
val thread =
|
||||||
Thread {
|
Thread {
|
||||||
var count = 0
|
var count = 0
|
||||||
@@ -112,7 +115,6 @@ fun RenderNostrNIP90ContentDiscoveryScreen(
|
|||||||
break
|
break
|
||||||
} else if (count > 1000) {
|
} else if (count > 1000) {
|
||||||
// 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
|
||||||
break
|
|
||||||
} else {
|
} else {
|
||||||
count++
|
count++
|
||||||
}
|
}
|
||||||
|
@@ -846,4 +846,6 @@
|
|||||||
<string name="draft_note">Draft Note</string>
|
<string name="draft_note">Draft Note</string>
|
||||||
|
|
||||||
<string name="load_from_text">From Msg</string>
|
<string name="load_from_text">From Msg</string>
|
||||||
|
|
||||||
|
<string name="dvm_no_status">DVM seems not to reply</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Reference in New Issue
Block a user