Update dependencies

This commit is contained in:
Kgothatso Ngako
2026-08-15 15:42:34 +02:00
parent 2f06485ec5
commit 086b2f4e70
56 changed files with 396 additions and 206 deletions

View File

@@ -1,8 +1,8 @@
package press.mantra.compose.database
import androidx.room3.ColumnTypeConverters
import androidx.room3.Database
import androidx.room3.RoomDatabase
import androidx.room3.TypeConverters
import androidx.room3.immediateTransaction
import androidx.room3.useWriterConnection
import press.mantra.compose.database.converters.MantraConverters
@@ -160,7 +160,7 @@ val GENESIS_AT = Instant.fromEpochMilliseconds(1231006505000L)
],
version = 1
)
@TypeConverters(MantraConverters::class)
@ColumnTypeConverters(MantraConverters::class)
abstract class MantraDatabase: RoomDatabase() {
abstract fun broadcastNostrEventReceiptDao(): BroadcastNostrEventReceiptDao
abstract fun broadcastNostrEventRequestDao(): BroadcastNostrEventRequestDao

View File

@@ -1,6 +1,6 @@
package press.mantra.compose.database.converters
import androidx.room3.TypeConverter
import androidx.room3.ColumnTypeConverter
import press.mantra.compose.database.model.types.SynchronizationFilter
import co.touchlab.kermit.Logger
import kotlinx.serialization.json.Json
@@ -9,30 +9,30 @@ import kotlin.time.Instant
class MantraConverters {
val logger = Logger.withTag("MantraConverters")
@TypeConverter
@ColumnTypeConverter
fun fromTimestamp(value: Long?): Instant? {
return value?.let { Instant.fromEpochSeconds(it) }
}
@TypeConverter
@ColumnTypeConverter
fun instantToTimestamp(instant: Instant?): Long? {
return instant?.epochSeconds
}
@TypeConverter
@ColumnTypeConverter
fun fromTagArray(value: Array<Array<String>>?): String? {
// Returns null if the value is null, otherwise serializes to JSON string
return value?.let { Json.encodeToString(it) }
}
@TypeConverter
@ColumnTypeConverter
fun toTagArray(value: String?): Array<Array<String>>? {
// Decodes the JSON string back into the nested array structure
return value?.let { Json.decodeFromString<Array<Array<String>>>(it) }
}
@TypeConverter
@ColumnTypeConverter
fun fromHexArray(value: Array<String>?): String? = try {
return value?.let {
Json.encodeToString(it).lowercase()
@@ -42,7 +42,7 @@ class MantraConverters {
return null
}
@TypeConverter
@ColumnTypeConverter
fun toHexArray(value: String?): Array<String>? = try {
return value?.let {
Json.decodeFromString<Array<String>>(it)
@@ -52,7 +52,7 @@ class MantraConverters {
return null
}
@TypeConverter
@ColumnTypeConverter
fun fromKindArray(value: Array<Int>?): String? = try {
return value?.let {
Json.encodeToString(it)
@@ -62,7 +62,7 @@ class MantraConverters {
return null
}
@TypeConverter
@ColumnTypeConverter
fun toKindArray(value: String?): Array<Int>? = try {
return value?.let {
Json.decodeFromString<Array<Int>>(it)
@@ -72,7 +72,7 @@ class MantraConverters {
return null
}
@TypeConverter
@ColumnTypeConverter
fun fromFilterArray(value: Array<SynchronizationFilter>?): String? = try {
return value?.let {
Json.encodeToString(value)
@@ -82,7 +82,7 @@ class MantraConverters {
return null
}
@TypeConverter
@ColumnTypeConverter
fun toFilterArray(value: String?): Array<SynchronizationFilter>? = try {
return value?.let {
Json.decodeFromString<Array<SynchronizationFilter>>(it)
@@ -92,7 +92,7 @@ class MantraConverters {
return null
}
@TypeConverter
@ColumnTypeConverter
fun fromSynchronizationFilter(value: SynchronizationFilter?): String? = try {
return value?.let {
Json.encodeToString(value)
@@ -102,7 +102,7 @@ class MantraConverters {
return null
}
@TypeConverter
@ColumnTypeConverter
fun toSynchronizationFilter(value: String?): SynchronizationFilter? = try {
return value?.let {
Json.decodeFromString<SynchronizationFilter>(it)

View File

@@ -0,0 +1,140 @@
package press.mantra.compose.database.model
import androidx.room3.Entity
import androidx.room3.ForeignKey
import androidx.room3.PrimaryKey
import com.vitorpamplona.quartz.nip01Core.core.HexKey
import com.vitorpamplona.quartz.nip01Core.core.TagArrayBuilder
import com.vitorpamplona.quartz.nip01Core.crypto.EventHasher
import com.vitorpamplona.quartz.nip01Core.signers.EventTemplate
import com.vitorpamplona.quartz.nip31Alts.AltTag
import press.mantra.compose.database.model.traits.OptionalNostrEventEntity
import press.mantra.compose.database.model.traits.TimestampedEntity
import press.mantra.compose.nostr.nip30303.TranslationChunkEvent
import press.mantra.compose.nostr.nip30303.tags.ChunkIdTag
import press.mantra.compose.nostr.nip30303.tags.IndexTag
import press.mantra.compose.nostr.nip30303.tags.TranslationChapterIdTag
import kotlin.time.Clock
import kotlin.time.Instant
/**
* 30311
*/
@Entity(
foreignKeys = [
ForeignKey(
entity = MantraChunk::class,
parentColumns = ["id"],
childColumns = ["chunkId"],
onDelete = ForeignKey.CASCADE,
),
ForeignKey(
entity = MantraTranslationChapter::class,
parentColumns = ["id"],
childColumns = ["translationChapterId"],
onDelete = ForeignKey.CASCADE,
),
ForeignKey(
entity = ChatRoom::class,
parentColumns = ["id"],
childColumns = ["chatRoomId"],
onDelete = ForeignKey.CASCADE,
),
],
)
data class MantraTranslationChunkProposal(
@PrimaryKey
val id: HexKey,
val publicKey: HexKey,
val chunkId: HexKey,
val translationChapterId: HexKey,
val text: String,
val index: Int,
/**
* Signature will be an empty string if this is a rumor
*/
val signature: String,
val chatRoomId: String,
val relayHint: String? = null,
val marmotGroupEventId: HexKey? = null,
/**
* Related nostrEventId if this is not a rumor...
*/
override val nostrEventId: HexKey? = null,
override val createdAt: Instant = Clock.System.now(),
override val updatedAt: Instant = createdAt
): OptionalNostrEventEntity, TimestampedEntity {
fun toTranslationChunkEvent(): TranslationChunkEvent {
return TranslationChunkEvent(
id = id,
pubKey = publicKey,
createdAt = createdAt.epochSeconds,
// Tag order matches TranslationChunkEvent.build so the id round-trips.
tags = TagArrayBuilder<TranslationChunkEvent>()
.addUnique(AltTag.assemble(TranslationChunkEvent.ALT_DESCRIPTION))
.addUnique(
TranslationChapterIdTag.assemble(translationChapterId)
)
.addUnique(
ChunkIdTag.assemble(chunkId)
)
.addUnique(
IndexTag.assemble(index)
)
.build(),
content = text,
sig = signature
)
}
companion object {
fun fromTranslationChunkEventTemplate(
translationChunkEventTemplate: EventTemplate<TranslationChunkEvent>,
chatRoomId: HexKey,
userPublicKey: HexKey,
): MantraTranslationChunkProposal? {
return fromTranslationChunkEvent(
TranslationChunkEvent(
id = EventHasher.hashId(
pubKey = userPublicKey,
tags = translationChunkEventTemplate.tags,
content = translationChunkEventTemplate.content,
createdAt = translationChunkEventTemplate.createdAt,
kind = translationChunkEventTemplate.kind,
),
content = translationChunkEventTemplate.content,
tags = translationChunkEventTemplate.tags,
createdAt = translationChunkEventTemplate.createdAt,
pubKey = userPublicKey,
sig = "", // Unsigned rumor
),
chatRoomId = chatRoomId,
)
}
fun fromTranslationChunkEvent(translationChunkEvent: TranslationChunkEvent, chatRoomId: HexKey): MantraTranslationChunkProposal? {
return translationChunkEvent.translationChapterId()?.let { translationChapterId ->
translationChunkEvent.chunkId()?.let { chunkId ->
translationChunkEvent.index()?.let { index ->
MantraTranslationChunkProposal(
id = translationChunkEvent.id,
publicKey = translationChunkEvent.pubKey,
createdAt = Instant.fromEpochSeconds(translationChunkEvent.createdAt),
translationChapterId = translationChapterId,
chunkId = chunkId,
index = index,
text = translationChunkEvent.content,
signature = translationChunkEvent.sig,
chatRoomId = chatRoomId
)
}
}
}
}
}
}

View File

@@ -136,8 +136,7 @@ class DatabaseNostrRepository(
)
val followUsers = listOf(ContactTag(publicKey, null, null))
val contactListTagList = listOf(AltTag.assemble(ContactListEvent.ALT)) +
followUsers.map { it.toTagArray() }
val contactListTagList = followUsers.map { it.toTagArray() }
unsignedNostrEvents.add(
UnsignedNostrEvent(
@@ -166,7 +165,7 @@ class DatabaseNostrRepository(
pubKey = publicKey,
kind = KeyPackageRelayListEvent.KIND,
tags = Relays.DefaultDMRelayList.map { arrayOf("relay", it.url) }
.plusElement(AltTag.assemble(KeyPackageRelayListEvent.ALT_DESCRIPTION))
// .plusElement(AltTag.assemble(KeyPackageRelayListEvent.ALT_DESCRIPTION))
.toTypedArray(),
content = ""
)
@@ -182,10 +181,7 @@ class DatabaseNostrRepository(
RelayTag.assemble(
it
)
}
.plus(
SearchRelayListEvent.ALT_TAG
).toTypedArray(),
}.toTypedArray(),
content = ""
)
)
@@ -195,7 +191,7 @@ class DatabaseNostrRepository(
pubKey = publicKey,
kind = RelayFeedsListEvent.KIND,
tags = arrayOf(
AltTag.assemble(RelayFeedsListEvent.ALT)
// AltTag.assemble(RelayFeedsListEvent.ALT)
),
privateTags = Relays.DefaultDMRelayList.map {
RelayTag.assemble(
@@ -409,7 +405,7 @@ class DatabaseNostrRepository(
if (status == "published") {
val broadcastNostrEventReceiptId = database.broadcastNostrEventReceiptDao().upsert(
_root_ide_package_.press.mantra.compose.database.model.BroadcastNostrEventReceipt(
press.mantra.compose.database.model.BroadcastNostrEventReceipt(
nostrEventId = broadcastNostrEventRequest.nostrEventId,
unsignedNostrEventId = broadcastNostrEventRequest.unsignedNostrEventId,
isAccepted = true,
@@ -422,7 +418,7 @@ class DatabaseNostrRepository(
)?.let { chatMessageBroadcastNostrEventRequestRelation ->
// This is actually a chatMessage related broadcast event...
database.chatMessageBroadcastNostrEventReceiptRelationDao().upsert(
_root_ide_package_.press.mantra.compose.database.model.ChatMessageBroadcastNostrEventReceiptRelation(
press.mantra.compose.database.model.ChatMessageBroadcastNostrEventReceiptRelation(
chatMessageId = chatMessageBroadcastNostrEventRequestRelation.chatMessageId,
broadcastNostrEventReceiptId = broadcastNostrEventReceiptId
)
@@ -796,7 +792,7 @@ class DatabaseNostrRepository(
synchronizationFilterArray: press.mantra.compose.database.model.typealiases.SynchronizationFilterArray?
) {
database.recentSearchDao().upsert(
_root_ide_package_.press.mantra.compose.database.model.RecentSearch(
press.mantra.compose.database.model.RecentSearch(
query = query,
synchronizationFilters = synchronizationFilterArray
)

View File

@@ -65,6 +65,6 @@ fun String.extractKeyPairFromPrivateKeyOrThrow(): Pair<String, String> {
nsec to pubkey.toNpub()
} catch (error: IllegalArgumentException) {
Logger.withTag("String.extractKeyPairFromPrivateKeyOrThrow").w(error) { error.message ?: "" }
throw _root_ide_package_.press.mantra.compose.exceptions.InvalidNostrPrivateKeyException()
throw press.mantra.compose.exceptions.InvalidNostrPrivateKeyException()
}
}

View File

@@ -4,7 +4,7 @@ class AuxDatabaseManager(
mantraGlobal: press.mantra.compose.MantraGlobal
) {
val auxDatabase by lazy {
_root_ide_package_.press.mantra.compose.database.builder.getRoomDatabase(
press.mantra.compose.database.builder.getRoomDatabase(
press.mantra.compose.database.builder.PlatformDatabaseBuilder.getDatabaseBuilder(
mantraGlobal.platformContext
)
@@ -17,7 +17,7 @@ class AuxDatabaseManager(
* We may also decide to just use the normal DB and manage what's saved better...
*/
val inMemoryAuxDatabase by lazy {
_root_ide_package_.press.mantra.compose.database.builder.getRoomDatabase(
press.mantra.compose.database.builder.getRoomDatabase(
press.mantra.compose.database.builder.PlatformDatabaseBuilder.getInMemoryDatabaseBuilder(
mantraGlobal.platformContext
)

View File

@@ -189,7 +189,7 @@ class RelayPool(
val filterRequest = OptimizedJsonMapper.toJson(reqCommand)
if (nostrSocketClient == null) {
throw _root_ide_package_.press.mantra.compose.exceptions.NetworkException("$relayUrl is not connected")
throw press.mantra.compose.exceptions.NetworkException("$relayUrl is not connected")
}
return coroutineScope {
val eventFlow = nostrSocketClient.queryAsFlow(reqCommand.subId)
@@ -213,7 +213,7 @@ class RelayPool(
val negentropySyncRequest = OptimizedJsonMapper.toJson(negOpenCmd)
if (nostrSocketClient == null) {
throw _root_ide_package_.press.mantra.compose.exceptions.NetworkException("$relayUrl is not connected")
throw press.mantra.compose.exceptions.NetworkException("$relayUrl is not connected")
}
return coroutineScope {
val eventFlow = nostrSocketClient.queryAsFlow(negOpenCmd.subId)
@@ -236,7 +236,7 @@ class RelayPool(
val closeSubscription = OptimizedJsonMapper.toJson(closeCmd)
if (nostrSocketClient == null) {
throw _root_ide_package_.press.mantra.compose.exceptions.NetworkException("$relayUrl is not connected")
throw press.mantra.compose.exceptions.NetworkException("$relayUrl is not connected")
}
coroutineScope {
with(nostrSocketClient) {
@@ -258,7 +258,7 @@ class RelayPool(
val closeNegentropySubscription = OptimizedJsonMapper.toJson(negCloseCmd)
if (nostrSocketClient == null) {
throw _root_ide_package_.press.mantra.compose.exceptions.NetworkException("$relayUrl is not connected")
throw press.mantra.compose.exceptions.NetworkException("$relayUrl is not connected")
}
coroutineScope {
with(nostrSocketClient) {

View File

@@ -58,11 +58,11 @@ sealed class NostrIncomingMessage {
fun NostrIncomingMessage?.verifyOrThrow(subscriptionId: String) {
if (this == null) {
throw _root_ide_package_.press.mantra.compose.exceptions.NetworkException("No messages received.")
throw press.mantra.compose.exceptions.NetworkException("No messages received.")
}
if (this is NostrIncomingMessage.NoticeMessage) {
throw _root_ide_package_.press.mantra.compose.exceptions.NostrNoticeException(
throw press.mantra.compose.exceptions.NostrNoticeException(
reason = this.message,
subscriptionId = subscriptionId,
)

View File

@@ -14,7 +14,7 @@ import kotlinx.serialization.json.jsonObject
import kotlinx.serialization.json.jsonPrimitive
fun String.parseIncomingMessage(): NostrIncomingMessage? {
val jsonArray = _root_ide_package_.press.mantra.compose.network.serialization.SocketsJson.decodeFromStringOrNull<JsonArray>(this)
val jsonArray = press.mantra.compose.network.serialization.SocketsJson.decodeFromStringOrNull<JsonArray>(this)
val verbElement = jsonArray?.elementAtOrNull(0) ?: return null
return try {

View File

@@ -82,7 +82,7 @@ internal class NostrSocketClientImpl(
logger.w("NostrSocketClient::acquireWebSocketSession($socketUrl) failed.", error)
close()
onSocketConnectionClosed?.invoke(socketUrl, error)
throw _root_ide_package_.press.mantra.compose.exceptions.NetworkException(cause = error)
throw press.mantra.compose.exceptions.NetworkException(cause = error)
}
}

View File

@@ -0,0 +1,55 @@
package press.mantra.compose.nostr.nip30303
import androidx.compose.runtime.Immutable
import com.vitorpamplona.quartz.nip01Core.core.Event
import com.vitorpamplona.quartz.nip01Core.core.HexKey
import com.vitorpamplona.quartz.nip01Core.core.TagArrayBuilder
import com.vitorpamplona.quartz.nip01Core.signers.eventTemplate
import com.vitorpamplona.quartz.nip22Comments.RootScope
import com.vitorpamplona.quartz.nip31Alts.alt
import com.vitorpamplona.quartz.nip50Search.SearchableEvent
import com.vitorpamplona.quartz.utils.TimeUtils
import press.mantra.compose.nostr.nip30303.tags.ChunkIdTag
import press.mantra.compose.nostr.nip30303.tags.IndexTag
import press.mantra.compose.nostr.nip30303.tags.TranslationArtifactVersionIdTag
import press.mantra.compose.nostr.nip30303.tags.TranslationChapterIdTag
@Immutable
class TranslationChunkProposalEvent(
id: HexKey,
pubKey: HexKey,
createdAt: Long,
tags: Array<Array<String>>,
content: String,
sig: HexKey,
) : Event(id, pubKey, createdAt, KIND, tags, content, sig) {
fun translationChapterIdReference() = tags.firstNotNullOfOrNull(TranslationChapterIdTag::parse)?.ref
fun translationChapterId() = translationChapterIdReference()?.eventId
fun index() = tags.firstNotNullOfOrNull(IndexTag::parse)?.index
fun chunkIdReference() = tags.firstNotNullOfOrNull(ChunkIdTag::parse)?.ref
fun chunkId() = chunkIdReference()?.eventId
companion object {
const val KIND = 30309
const val ALT_DESCRIPTION = "TranslationChunk"
fun build(
translationChapterId: String,
chunkId: String,
index: Int,
text: String,
createdAt: Long = TimeUtils.now(),
initializer: TagArrayBuilder<TranslationChunkProposalEvent>.() -> Unit = {},
) = eventTemplate(KIND, text, createdAt) {
alt(ALT_DESCRIPTION)
addUnique(TranslationChapterIdTag.assemble(translationChapterId))
addUnique(ChunkIdTag.assemble(chunkId))
addUnique(IndexTag.assemble(index))
initializer()
}
}
}

View File

@@ -62,13 +62,13 @@ class NostrNotaryRepository(
}
fun onFailure() {
setResponse(SignResult.Rejected(_root_ide_package_.press.mantra.compose.exceptions.SigningRejectedException()))
setResponse(SignResult.Rejected(press.mantra.compose.exceptions.SigningRejectedException()))
}
private fun findNsecOrThrow(activeUserPublicKey: String): String =
runCatching {
walletManager.keyManager.value?.nostrPrivateKey()?.value?.toByteArray()?.toNsec()
}.getOrNull() ?: throw _root_ide_package_.press.mantra.compose.exceptions.SigningKeyNotFoundException()
}.getOrNull() ?: throw press.mantra.compose.exceptions.SigningKeyNotFoundException()
private fun signNostrEvent(publicKey: String, event: press.mantra.compose.database.model.UnsignedNostrEvent): press.mantra.compose.database.model.NostrEvent {
val isExternalSignerLogin = runCatching {
@@ -85,7 +85,7 @@ class NostrNotaryRepository(
suspend fun signRelayListMetadata(userId: String, relays: List<press.mantra.compose.network.dto.RelayDTO>): SignResult {
return signNostrEvent(
unsignedNostrEvent = _root_ide_package_.press.mantra.compose.database.model.UnsignedNostrEvent(
unsignedNostrEvent = press.mantra.compose.database.model.UnsignedNostrEvent(
pubKey = userId,
content = "",
kind = RelayFeedsListEvent.KIND,

View File

@@ -39,7 +39,7 @@ class NostrPublisherRepository(
relaysSocketManager.publishEvent(
nostrEvent = signedNostrEvent,
relays = outboxRelays.map {
_root_ide_package_.press.mantra.compose.network.dto.RelayDTO(
press.mantra.compose.network.dto.RelayDTO(
url = it,
read = false,
write = true

View File

@@ -360,7 +360,7 @@ fun ActiveProfileScreen(
@Preview
@Composable
private fun UnannouncedProfileScreenPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {
@@ -379,7 +379,7 @@ It has survived not only five centuries, but also the leap into electronic types
sig = "",
kind = MetadataEvent.KIND
),
profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
profile = press.mantra.compose.database.model.Profile(
publicKey = "84dee6e676e5bb67b4ad4e042cf70cbd8681155db535942fcc6a0533858a7240",
displayName = "John Doe",
nostrEventId = "nostrEventId",

View File

@@ -167,7 +167,7 @@ fun ChatRoomCreationScreen(
@Preview
@Composable
private fun LoadingScreenPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {

View File

@@ -308,7 +308,7 @@ fun CreateProfileScreen(
Button(
colors = ButtonDefaults.buttonColors(
containerColor = _root_ide_package_.press.mantra.compose.ui.theme.RedPill,
containerColor = press.mantra.compose.ui.theme.RedPill,
contentColor = Color.White
),
onClick = {
@@ -326,7 +326,7 @@ fun CreateProfileScreen(
Button(
colors = ButtonDefaults.buttonColors(
containerColor = _root_ide_package_.press.mantra.compose.ui.theme.BluePill,
containerColor = press.mantra.compose.ui.theme.BluePill,
contentColor = Color.DarkGray
),
onClick = {
@@ -353,7 +353,7 @@ fun CreateProfileScreen(
@Preview
@Composable
fun CreateAccountScreenPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {
@@ -386,8 +386,8 @@ fun CreateAccountScreenPreview() {
// name = "Alan Turing",
// bio = "Polyglot: Math... is my middle name, computer scientist. cryptographer, and gold hider."
// ),
// _root_ide_package_.press.mantra.compose.ui.view.state.CreateProfileUIState.ProfileReady(
// profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
// press.mantra.compose.ui.view.state.CreateProfileUIState.ProfileReady(
// profile = press.mantra.compose.database.model.Profile(
// publicKey = "",
// nostrEventId = "",
// displayName = "Alan Turing",

View File

@@ -39,7 +39,7 @@ fun ImplementationPendingScreen(
@Preview
@Composable
private fun ImplementationPendingScreenPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {

View File

@@ -221,7 +221,7 @@ fun KeyPackageManagementScreen(
@Preview
@Composable
private fun UnannouncedProfileScreenPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {

View File

@@ -101,7 +101,7 @@ fun LandingScreen(
@Preview
@Composable
private fun LandingScreenPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {

View File

@@ -17,7 +17,7 @@ fun LoadingScreen(
Column(
modifier = Modifier.padding(innerPadding)
) {
_root_ide_package_.press.mantra.compose.ui.composable.widgets.LoadingDataIndicator(
press.mantra.compose.ui.composable.widgets.LoadingDataIndicator(
text = text
)
}
@@ -27,7 +27,7 @@ fun LoadingScreen(
@Preview
@Composable
private fun LoadingScreenPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {

View File

@@ -245,7 +245,7 @@ fun SearchResultScreen(
localNostrEvent.ListView(
onNavigateToEvent = { nostrEventId ->
onNavigateToEvent.invoke(
_root_ide_package_.press.mantra.compose.ui.composable.navigation.routes.NostrEventDetailRoute(
press.mantra.compose.ui.composable.navigation.routes.NostrEventDetailRoute(
activeUserPublicKey = activeUserPublicKey,
nostrEventId = nostrEventId
)
@@ -292,7 +292,7 @@ fun SearchResultScreen(
@Preview
@Composable
private fun SearchResultScreenPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {

View File

@@ -220,7 +220,7 @@ fun ShareProfileScreen(
@Preview
@Composable
private fun UnannouncedProfileScreenPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {
@@ -239,7 +239,7 @@ It has survived not only five centuries, but also the leap into electronic types
sig = "",
kind = MetadataEvent.KIND
),
profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
profile = press.mantra.compose.database.model.Profile(
publicKey = "84dee6e676e5bb67b4ad4e042cf70cbd8681155db535942fcc6a0533858a7240",
displayName = "John Doe",
nostrEventId = "nostrEventId",

View File

@@ -254,7 +254,7 @@ fun SignInToProfileScreen(
@Preview
@Composable
private fun SignInToProfileScreenPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {

View File

@@ -114,7 +114,7 @@ fun SocialPreconditionScreen(
@Preview
@Composable
private fun SocialPreconditionScreenPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {

View File

@@ -117,7 +117,7 @@ fun SovereignWalletStartupScreen(
}
when (val wallet = loadingWallet) {
null -> {
_root_ide_package_.press.mantra.compose.ui.composable.widgets.wallet.WalletsSelector(
press.mantra.compose.ui.composable.widgets.wallet.WalletsSelector(
wallets = availableWallets,
globalPrefs = globalPrefs,
walletsMetadata = availableWalletMetadata,

View File

@@ -52,7 +52,7 @@ fun UnannouncedProfileScreen() {
Spacer(
modifier = Modifier.weight(1f)
)
_root_ide_package_.press.mantra.compose.ui.composable.widgets.LoadingDataIndicator(
press.mantra.compose.ui.composable.widgets.LoadingDataIndicator(
fillScreen = false
)
@@ -70,7 +70,7 @@ fun UnannouncedProfileScreen() {
@Preview
@Composable
private fun UnannouncedProfileScreenPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {

View File

@@ -52,7 +52,7 @@ fun UnindexedProfileScreen() {
Spacer(
modifier = Modifier.weight(1f)
)
_root_ide_package_.press.mantra.compose.ui.composable.widgets.LoadingDataIndicator(
press.mantra.compose.ui.composable.widgets.LoadingDataIndicator(
fillScreen = false
)
@@ -70,7 +70,7 @@ fun UnindexedProfileScreen() {
@Preview
@Composable
private fun UnannouncedProfileScreenPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {

View File

@@ -52,7 +52,7 @@ fun UnqueuedProfileScreen() {
Spacer(
modifier = Modifier.weight(1f)
)
_root_ide_package_.press.mantra.compose.ui.composable.widgets.LoadingDataIndicator(
press.mantra.compose.ui.composable.widgets.LoadingDataIndicator(
fillScreen = false
)
@@ -70,7 +70,7 @@ fun UnqueuedProfileScreen() {
@Preview
@Composable
private fun UnannouncedProfileScreenPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {

View File

@@ -63,7 +63,7 @@ fun UnqueuedProfileSynchronizationScreen(
textAlign = TextAlign.Center
)
_root_ide_package_.press.mantra.compose.ui.composable.widgets.LoadingDataIndicator(
press.mantra.compose.ui.composable.widgets.LoadingDataIndicator(
fillScreen = false
)
@@ -82,7 +82,7 @@ fun UnqueuedProfileSynchronizationScreen(
@Preview
@Composable
private fun UnqueuedProfileSynchronizationScreenPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {

View File

@@ -49,7 +49,7 @@ fun UnsignedProfileScreen() {
textAlign = TextAlign.Center
)
_root_ide_package_.press.mantra.compose.ui.composable.widgets.LoadingDataIndicator(
press.mantra.compose.ui.composable.widgets.LoadingDataIndicator(
fillScreen = false
)
@@ -64,7 +64,7 @@ fun UnsignedProfileScreen() {
@Preview
@Composable
private fun UnsignedProfileScreenPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {

View File

@@ -51,7 +51,7 @@ fun UnsyncedProfileScreen(
textAlign = TextAlign.Center
)
_root_ide_package_.press.mantra.compose.ui.composable.widgets.LoadingDataIndicator(
press.mantra.compose.ui.composable.widgets.LoadingDataIndicator(
fillScreen = false
)
@@ -66,7 +66,7 @@ fun UnsyncedProfileScreen(
@Preview
@Composable
private fun UnsyncedProfileScreenPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {

View File

@@ -79,7 +79,7 @@ fun WriteNewNoteScreen(
when (val writeNewNoteUIState = writeNewNoteViewModel.writeNewNoteUIState) {
is press.mantra.compose.ui.view.state.WriteNewNoteUIState.Loading -> {
_root_ide_package_.press.mantra.compose.ui.composable.widgets.LoadingDataIndicator()
press.mantra.compose.ui.composable.widgets.LoadingDataIndicator()
}
is press.mantra.compose.ui.view.state.WriteNewNoteUIState.InputPrompt -> {
@@ -158,7 +158,7 @@ fun WriteNewNoteScreen(
)
},
leadingIcon = {
_root_ide_package_.press.mantra.compose.ui.composable.widgets.profile.ProfileAvatar(
press.mantra.compose.ui.composable.widgets.profile.ProfileAvatar(
profile = writeNewNoteUIState.localProfile.profile,
size = 35.dp
)
@@ -219,7 +219,7 @@ fun WriteNewNoteScreen(
)
},
leadingIcon = {
_root_ide_package_.press.mantra.compose.ui.composable.widgets.profile.ProfileAvatar(
press.mantra.compose.ui.composable.widgets.profile.ProfileAvatar(
profile = profile
)
},
@@ -322,7 +322,7 @@ fun WriteNewNoteScreen(
)
}
_root_ide_package_.press.mantra.compose.ui.composable.widgets.profile.ProfileAvatar(
press.mantra.compose.ui.composable.widgets.profile.ProfileAvatar(
profile = writeNewNoteUIState.localProfile.profile
)
@@ -334,9 +334,9 @@ fun WriteNewNoteScreen(
)
}
_root_ide_package_.press.mantra.compose.ui.composable.widgets.content.RichContent(
press.mantra.compose.ui.composable.widgets.content.RichContent(
// Hack to have the thing rendered for a preview...
nostrEvent = _root_ide_package_.press.mantra.compose.database.model.NostrEvent(
nostrEvent = press.mantra.compose.database.model.NostrEvent(
id = "",
content = writeNewNoteUIState.text,
sig = "",
@@ -347,8 +347,8 @@ fun WriteNewNoteScreen(
),
localQuotedNostrEvent = null,
mentionedProfiles = writeNewNoteViewModel.mentionableProfiles.map {
_root_ide_package_.press.mantra.compose.database.model.intermdiate.LocalMention(
mention = _root_ide_package_.press.mantra.compose.database.model.Mention(
press.mantra.compose.database.model.intermdiate.LocalMention(
mention = press.mantra.compose.database.model.Mention(
mentionedPublicKey = it.publicKey,
mentioningNostrEventId = ""
),
@@ -443,7 +443,7 @@ fun WriteNewNoteScreen(
@Preview
@Composable
private fun WriteNewNoteScreenPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {
@@ -454,8 +454,8 @@ private fun WriteNewNoteScreenPreview() {
initialWriteNewNoteUIState =
press.mantra.compose.ui.view.state.WriteNewNoteUIState.InputPrompt(
// text = "Yes, I did it. So WHAT?!",
inReplyToNostrEvent = _root_ide_package_.press.mantra.compose.database.model.intermdiate.LocalNostrEvent(
nostrEvent = _root_ide_package_.press.mantra.compose.database.model.NostrEvent(
inReplyToNostrEvent = press.mantra.compose.database.model.intermdiate.LocalNostrEvent(
nostrEvent = press.mantra.compose.database.model.NostrEvent(
id = "eventId",
pubKey = "publicKey",
content = """Lorem Ipsum is simply dummy text of the printing and typesetting industry.
@@ -467,14 +467,14 @@ It has survived not only five centuries, but also the leap into electronic types
sig = "",
kind = TextNoteEvent.KIND
),
profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
profile = press.mantra.compose.database.model.Profile(
publicKey = "pubKey",
displayName = "John Doe",
nostrEventId = "nostrEventId"
),
),
localProfile = _root_ide_package_.press.mantra.compose.database.model.intermdiate.LocalProfileWithFollowing(
nostrEvent = _root_ide_package_.press.mantra.compose.database.model.NostrEvent(
localProfile = press.mantra.compose.database.model.intermdiate.LocalProfileWithFollowing(
nostrEvent = press.mantra.compose.database.model.NostrEvent(
id = "eventId",
pubKey = "publicKey",
content = """Lorem Ipsum is simply dummy text of the printing and typesetting industry.
@@ -486,7 +486,7 @@ It has survived not only five centuries, but also the leap into electronic types
sig = "",
kind = TextNoteEvent.KIND
),
profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
profile = press.mantra.compose.database.model.Profile(
publicKey = "pubKey",
displayName = "John Doe",
nip05 = "john@doe.com",

View File

@@ -57,7 +57,7 @@ fun LoadingDataIndicator(
@Preview
@Composable
private fun TransferHistoryScreenPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(modifier = Modifier.fillMaxSize()) {
LoadingDataIndicator(
text = "Starting up"

View File

@@ -125,7 +125,7 @@ private fun ArticleCard(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier.padding(top = 6.dp)
) {
_root_ide_package_.press.mantra.compose.ui.composable.widgets.profile.ProfileAvatar(
press.mantra.compose.ui.composable.widgets.profile.ProfileAvatar(
profile = profile,
publicKey = localNostrEvent.nostrEvent.pubKey,
size = 20.dp

View File

@@ -130,7 +130,7 @@ internal fun LiveStreamCardContent(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier.padding(top = 6.dp)
) {
_root_ide_package_.press.mantra.compose.ui.composable.widgets.profile.ProfileAvatar(
press.mantra.compose.ui.composable.widgets.profile.ProfileAvatar(
profile = profile,
publicKey = event.pubKey,
size = 20.dp

View File

@@ -114,14 +114,14 @@ fun QuotedNote(
@Preview
@Composable
private fun QuotedNotePreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {
QuotedNote(
localQuotedNostrEvent = _root_ide_package_.press.mantra.compose.database.model.intermdiate.LocalQuotedNostrEvent(
nostrEvent = _root_ide_package_.press.mantra.compose.database.model.NostrEvent(
localQuotedNostrEvent = press.mantra.compose.database.model.intermdiate.LocalQuotedNostrEvent(
nostrEvent = press.mantra.compose.database.model.NostrEvent(
id = "1c7213118d4e17c6bad5c6b11125f005619bc3e43374affb9cd6483f665fd5e6",
content = "God is not in the habit of coming down from heaven to solve peoples problems on earth.",
pubKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
@@ -129,12 +129,12 @@ private fun QuotedNotePreview() {
sig = "hexsig",
tags = emptyArray()
),
quotedRelation = _root_ide_package_.press.mantra.compose.database.model.QuotedRelation(
quotedRelation = press.mantra.compose.database.model.QuotedRelation(
quotingNostrEventId = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a520",
quotedProfilePublicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
quotedNostrEventId = "1c7213118d4e17c6bad5c6b11125f005619bc3e43374affb9cd6483f665fd5e6"
),
profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
profile = press.mantra.compose.database.model.Profile(
publicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
nostrEventId = "referenced",
displayName = "Steve Biko"

View File

@@ -396,7 +396,7 @@ fun RichContent(
@Preview
@Composable
private fun RichContentPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {
@@ -405,7 +405,7 @@ private fun RichContentPreview() {
) {
RichContent(
modifier = Modifier.padding(10.dp),
nostrEvent = _root_ide_package_.press.mantra.compose.database.model.NostrEvent(
nostrEvent = press.mantra.compose.database.model.NostrEvent(
id = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a520",
content = "Something something something nostr:npub1uh366qnj68a7atvwgwdy4569xd6v5jtferftapqztwjwlzh9553q47pqsx\nhttps://www.brainyquote.com/authors/steven-biko-quotes\nnostr:nevent1qqspcusnzxx5u97xht2udvg3yhcq2cvmc0jrxa90lwwdvjplve0atespzpmhxue69uhkummnw3ezuamfdejsyg8h5g639qhuv803hzwexfwhyud6t6suxfu364anddqvrmn9j4cahvxksr8q",
pubKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
@@ -413,8 +413,8 @@ private fun RichContentPreview() {
sig = "hexsig",
tags = emptyArray()
),
localQuotedNostrEvent = _root_ide_package_.press.mantra.compose.database.model.intermdiate.LocalQuotedNostrEvent(
nostrEvent = _root_ide_package_.press.mantra.compose.database.model.NostrEvent(
localQuotedNostrEvent = press.mantra.compose.database.model.intermdiate.LocalQuotedNostrEvent(
nostrEvent = press.mantra.compose.database.model.NostrEvent(
id = "1c7213118d4e17c6bad5c6b11125f005619bc3e43374affb9cd6483f665fd5e6",
content = "God is not in the habit of coming down from heaven to solve peoples problems on earth.",
pubKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
@@ -422,24 +422,24 @@ private fun RichContentPreview() {
sig = "hexsig",
tags = emptyArray()
),
quotedRelation = _root_ide_package_.press.mantra.compose.database.model.QuotedRelation(
quotedRelation = press.mantra.compose.database.model.QuotedRelation(
quotingNostrEventId = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a520",
quotedProfilePublicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
quotedNostrEventId = "1c7213118d4e17c6bad5c6b11125f005619bc3e43374affb9cd6483f665fd5e6"
),
profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
profile = press.mantra.compose.database.model.Profile(
publicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
nostrEventId = "referenced",
displayName = "Steve Biko"
),
),
mentionedProfiles = listOf(
_root_ide_package_.press.mantra.compose.database.model.intermdiate.LocalMention(
mention = _root_ide_package_.press.mantra.compose.database.model.Mention(
press.mantra.compose.database.model.intermdiate.LocalMention(
mention = press.mantra.compose.database.model.Mention(
id = 1,
mentionedPublicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
),
profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
profile = press.mantra.compose.database.model.Profile(
publicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
nostrEventId = "referenced",
displayName = "Frank Talk"

View File

@@ -202,7 +202,7 @@ fun TextNoteEventDetail(
) {
val profile = localNostrEvent.profile
_root_ide_package_.press.mantra.compose.ui.composable.widgets.profile.ProfileAvatar(
press.mantra.compose.ui.composable.widgets.profile.ProfileAvatar(
profile = localNostrEvent.profile,
publicKey = localNostrEvent.nostrEvent.pubKey
)
@@ -249,7 +249,7 @@ fun TextNoteEventDetail(
}
}
_root_ide_package_.press.mantra.compose.ui.composable.widgets.content.RichContent(
press.mantra.compose.ui.composable.widgets.content.RichContent(
modifier = Modifier.fillMaxWidth().padding(
horizontal = 20.dp
),
@@ -380,13 +380,13 @@ fun TextNoteEventDetail(
@Composable
private fun TextNoteEventDetailPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {
TextNoteEventDetail(
localNostrEvent = _root_ide_package_.press.mantra.compose.database.model.intermdiate.LocalNostrEvent(
nostrEvent = _root_ide_package_.press.mantra.compose.database.model.NostrEvent(
localNostrEvent = press.mantra.compose.database.model.intermdiate.LocalNostrEvent(
nostrEvent = press.mantra.compose.database.model.NostrEvent(
id = "eventId",
pubKey = "publicKey",
content = """Lorem Ipsum is simply dummy text of the printing and typesetting industry.
@@ -398,7 +398,7 @@ It has survived not only five centuries, but also the leap into electronic types
sig = "",
kind = TextNoteEvent.KIND
),
profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
profile = press.mantra.compose.database.model.Profile(
publicKey = "pubKey",
displayName = "John Doe",
nip05 = "john@doe.me",

View File

@@ -121,12 +121,12 @@ fun press.mantra.compose.database.model.intermdiate.LocalNostrEvent.ListView(
@Preview
@Composable
private fun EventListViewRepostedPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {
_root_ide_package_.press.mantra.compose.database.model.intermdiate.LocalNostrEvent(
nostrEvent = _root_ide_package_.press.mantra.compose.database.model.NostrEvent(
press.mantra.compose.database.model.intermdiate.LocalNostrEvent(
nostrEvent = press.mantra.compose.database.model.NostrEvent(
id = "hex",
content = "Reposting",
pubKey = "hexpubkeypubkeypubkeypubkey",
@@ -134,13 +134,13 @@ private fun EventListViewRepostedPreview() {
sig = "hexsig",
tags = emptyArray()
),
localRepostedNostrEvent = _root_ide_package_.press.mantra.compose.database.model.intermdiate.LocalRepostedNostrEvent(
repostedRelation = _root_ide_package_.press.mantra.compose.database.model.RepostedRelation(
localRepostedNostrEvent = press.mantra.compose.database.model.intermdiate.LocalRepostedNostrEvent(
repostedRelation = press.mantra.compose.database.model.RepostedRelation(
repostingNostrEventId = "hex",
repostedNostrEventId = "repostedhex",
repostedProfilePublicKey = "reposterHex"
),
nostrEvent = _root_ide_package_.press.mantra.compose.database.model.NostrEvent(
nostrEvent = press.mantra.compose.database.model.NostrEvent(
id = "hex",
content = "Something something something",
pubKey = "hexpubkeypubkeypubkeypubkey",
@@ -148,7 +148,7 @@ private fun EventListViewRepostedPreview() {
sig = "hexsig",
tags = emptyArray()
),
profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
profile = press.mantra.compose.database.model.Profile(
publicKey = "hesd",
nostrEventId = "referenced",
displayName = "Frank Talk",
@@ -156,7 +156,7 @@ private fun EventListViewRepostedPreview() {
),
mentionedProfiles = emptyList()
),
profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
profile = press.mantra.compose.database.model.Profile(
publicKey = "",
nostrEventId = "referenced",
displayName = "Steve Biko",
@@ -172,12 +172,12 @@ private fun EventListViewRepostedPreview() {
@Preview
@Composable
private fun EventListViewInReplyPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {
_root_ide_package_.press.mantra.compose.database.model.intermdiate.LocalNostrEvent(
nostrEvent = _root_ide_package_.press.mantra.compose.database.model.NostrEvent(
press.mantra.compose.database.model.intermdiate.LocalNostrEvent(
nostrEvent = press.mantra.compose.database.model.NostrEvent(
id = "hex",
content = "Reposting",
pubKey = "hexpubkeypubkeypubkeypubkey",
@@ -185,15 +185,15 @@ private fun EventListViewInReplyPreview() {
sig = "hexsig",
tags = emptyArray()
),
localInReplyToNostrEvent = _root_ide_package_.press.mantra.compose.database.model.intermdiate.LocalInReplyToNostrEvent(
inReplyToRelation = _root_ide_package_.press.mantra.compose.database.model.InReplyToRelation(
localInReplyToNostrEvent = press.mantra.compose.database.model.intermdiate.LocalInReplyToNostrEvent(
inReplyToRelation = press.mantra.compose.database.model.InReplyToRelation(
inReplyToNostrEventId = "nostrEvent",
inReplyToRootNostrEventId = "rootId",
inReplyToProfilePublicKey = "inReplyToProfileKey",
inReplyToRootProfilePublicKey = "rootPubKey",
replyingNostrEventId = "hex"
),
nostrEvent = _root_ide_package_.press.mantra.compose.database.model.NostrEvent(
nostrEvent = press.mantra.compose.database.model.NostrEvent(
id = "hex",
content = "Something something something",
pubKey = "hexpubkeypubkeypubkeypubkey",
@@ -201,7 +201,7 @@ private fun EventListViewInReplyPreview() {
sig = "hexsig",
tags = emptyArray()
),
profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
profile = press.mantra.compose.database.model.Profile(
publicKey = "hesd",
nostrEventId = "referenced",
displayName = "Frank Talk",
@@ -209,7 +209,7 @@ private fun EventListViewInReplyPreview() {
),
mentionedProfiles = emptyList()
),
profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
profile = press.mantra.compose.database.model.Profile(
publicKey = "",
nostrEventId = "referenced",
displayName = "Steve Biko",

View File

@@ -88,7 +88,7 @@ internal fun TextNoteFeedItem(
horizontalArrangement = Arrangement.spacedBy(10.dp, Alignment.Start),
verticalAlignment = Alignment.CenterVertically
) {
_root_ide_package_.press.mantra.compose.ui.composable.widgets.profile.ProfileAvatar(
press.mantra.compose.ui.composable.widgets.profile.ProfileAvatar(
publicKey = nostrEvent.pubKey,
profile = profile
)
@@ -116,7 +116,7 @@ internal fun TextNoteFeedItem(
)
}
_root_ide_package_.press.mantra.compose.ui.composable.widgets.content.RichContent(
press.mantra.compose.ui.composable.widgets.content.RichContent(
modifier = Modifier.fillMaxWidth(),
nostrEvent = nostrEvent,
localQuotedNostrEvent = localQuotedNostrEvent,
@@ -179,12 +179,12 @@ internal fun TextNoteFeedItem(
@Preview
@Composable
private fun TextNoteFeedItemPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {
TextNoteFeedItem(
nostrEvent = _root_ide_package_.press.mantra.compose.database.model.NostrEvent(
nostrEvent = press.mantra.compose.database.model.NostrEvent(
id = "hex",
content = "You are either alive and proud or you are dead, and when you are dead, you can't care anyway. https://www.brainyquote.com/authors/steven-biko-quotes",
pubKey = "hexpubkeypubkeypubkeypubkey",
@@ -192,7 +192,7 @@ private fun TextNoteFeedItemPreview() {
sig = "hexsig",
tags = emptyArray()
),
profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
profile = press.mantra.compose.database.model.Profile(
publicKey = "",
nostrEventId = "referenced",
displayName = "Frank Talk",
@@ -210,12 +210,12 @@ private fun TextNoteFeedItemPreview() {
@Preview
@Composable
private fun TextNoteFeedItemInReplyToPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {
TextNoteFeedItem(
nostrEvent = _root_ide_package_.press.mantra.compose.database.model.NostrEvent(
nostrEvent = press.mantra.compose.database.model.NostrEvent(
id = "hex",
content = "It is better to die for an idea that will live, than to live for an idea that will die",
pubKey = "hexpubkeypubkeypubkeypubkey",
@@ -223,22 +223,22 @@ private fun TextNoteFeedItemInReplyToPreview() {
sig = "hexsig",
tags = emptyArray()
),
profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
profile = press.mantra.compose.database.model.Profile(
publicKey = "",
nostrEventId = "referenced",
displayName = "Frank Talk",
nip05 = "frank@talk.at"
),
localQuotedNostrEvent = null,
localInReplyToNostrEvent = _root_ide_package_.press.mantra.compose.database.model.intermdiate.LocalInReplyToNostrEvent(
inReplyToRelation = _root_ide_package_.press.mantra.compose.database.model.InReplyToRelation(
localInReplyToNostrEvent = press.mantra.compose.database.model.intermdiate.LocalInReplyToNostrEvent(
inReplyToRelation = press.mantra.compose.database.model.InReplyToRelation(
inReplyToNostrEventId = "nostrEvent",
inReplyToRootNostrEventId = "rootId",
inReplyToProfilePublicKey = "inReplyToProfileKey",
inReplyToRootProfilePublicKey = "rootPubKey",
replyingNostrEventId = "hex"
),
nostrEvent = _root_ide_package_.press.mantra.compose.database.model.NostrEvent(
nostrEvent = press.mantra.compose.database.model.NostrEvent(
id = "hex",
content = "Something something something",
pubKey = "hexie",
@@ -246,7 +246,7 @@ private fun TextNoteFeedItemInReplyToPreview() {
sig = "hexsig",
tags = emptyArray()
),
profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
profile = press.mantra.compose.database.model.Profile(
publicKey = "hesd",
nostrEventId = "referenced",
displayName = "Steve Biko",
@@ -264,12 +264,12 @@ private fun TextNoteFeedItemInReplyToPreview() {
@Preview
@Composable
private fun TextNoteFeedItemQuoteNostrEventPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {
TextNoteFeedItem(
nostrEvent = _root_ide_package_.press.mantra.compose.database.model.NostrEvent(
nostrEvent = press.mantra.compose.database.model.NostrEvent(
id = "hex",
content = "The revolutionary sees his task as liberation not only of the oppressed but also of the oppressor. Happiness can never truly exist in a state of tension.\n" +
"Read more at nostr:npub1uh366qnj68a7atvwgwdy4569xd6v5jtferftapqztwjwlzh9553q47pqsx\nnostr:nevent1qqspcusnzxx5u97xht2udvg3yhcq2cvmc0jrxa90lwwdvjplve0atespzpmhxue69uhkummnw3ezuamfdejsyg8h5g639qhuv803hzwexfwhyud6t6suxfu364anddqvrmn9j4cahvxksr8q",
@@ -278,14 +278,14 @@ private fun TextNoteFeedItemQuoteNostrEventPreview() {
sig = "hexsig",
tags = emptyArray()
),
profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
profile = press.mantra.compose.database.model.Profile(
publicKey = "",
nostrEventId = "referenced",
displayName = "Frank Talk",
nip05 = "frank@talk.at"
),
localQuotedNostrEvent = _root_ide_package_.press.mantra.compose.database.model.intermdiate.LocalQuotedNostrEvent(
nostrEvent = _root_ide_package_.press.mantra.compose.database.model.NostrEvent(
localQuotedNostrEvent = press.mantra.compose.database.model.intermdiate.LocalQuotedNostrEvent(
nostrEvent = press.mantra.compose.database.model.NostrEvent(
id = "1c7213118d4e17c6bad5c6b11125f005619bc3e43374affb9cd6483f665fd5e6",
content = "God is not in the habit of coming down from heaven to solve peoples problems on earth.",
pubKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
@@ -293,26 +293,26 @@ private fun TextNoteFeedItemQuoteNostrEventPreview() {
sig = "hexsig",
tags = emptyArray()
),
quotedRelation = _root_ide_package_.press.mantra.compose.database.model.QuotedRelation(
quotedRelation = press.mantra.compose.database.model.QuotedRelation(
quotingNostrEventId = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a520",
quotedProfilePublicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
quotedNostrEventId = "1c7213118d4e17c6bad5c6b11125f005619bc3e43374affb9cd6483f665fd5e6"
),
profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
profile = press.mantra.compose.database.model.Profile(
publicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
nostrEventId = "referenced",
displayName = "Steve Biko"
),
),
localInReplyToNostrEvent = _root_ide_package_.press.mantra.compose.database.model.intermdiate.LocalInReplyToNostrEvent(
inReplyToRelation = _root_ide_package_.press.mantra.compose.database.model.InReplyToRelation(
localInReplyToNostrEvent = press.mantra.compose.database.model.intermdiate.LocalInReplyToNostrEvent(
inReplyToRelation = press.mantra.compose.database.model.InReplyToRelation(
inReplyToNostrEventId = "nostrEvent",
inReplyToRootNostrEventId = "rootId",
inReplyToProfilePublicKey = "inReplyToProfileKey",
inReplyToRootProfilePublicKey = "rootPubKey",
replyingNostrEventId = "hex"
),
nostrEvent = _root_ide_package_.press.mantra.compose.database.model.NostrEvent(
nostrEvent = press.mantra.compose.database.model.NostrEvent(
id = "hex",
content = "Something something something",
pubKey = "hexie",
@@ -320,7 +320,7 @@ private fun TextNoteFeedItemQuoteNostrEventPreview() {
sig = "hexsig",
tags = emptyArray()
),
profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
profile = press.mantra.compose.database.model.Profile(
publicKey = "hesd",
nostrEventId = "referenced",
displayName = "Steve Biko",
@@ -329,12 +329,12 @@ private fun TextNoteFeedItemQuoteNostrEventPreview() {
mentionedProfiles = emptyList()
),
mentionedProfiles = listOf(
_root_ide_package_.press.mantra.compose.database.model.intermdiate.LocalMention(
mention = _root_ide_package_.press.mantra.compose.database.model.Mention(
press.mantra.compose.database.model.intermdiate.LocalMention(
mention = press.mantra.compose.database.model.Mention(
mentioningNostrEventId = "000067b3f15cac88ba066b28c370083a4fc80dacc054e554ab1dc0def974c89c",
mentionedPublicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522"
),
profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
profile = press.mantra.compose.database.model.Profile(
publicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
nostrEventId = "referenced",
displayName = "Steve Biko",

View File

@@ -58,18 +58,18 @@ fun ProfileAvatar(
} else {
// Load image...
val placeHolderGraphic =
_root_ide_package_.press.mantra.compose.ui.composable.widgets.coil.forwardingPainter(
press.mantra.compose.ui.composable.widgets.coil.forwardingPainter(
painter = rememberVectorPainter(Icons.Default.Face5),
colorFilter = ColorFilter.tint(tintColor)
)
val fallbackGraphic =
_root_ide_package_.press.mantra.compose.ui.composable.widgets.coil.forwardingPainter(
press.mantra.compose.ui.composable.widgets.coil.forwardingPainter(
painter = rememberVectorPainter(Icons.Default.Face5),
colorFilter = ColorFilter.tint(tintColor)
)
val errorGraphic =
_root_ide_package_.press.mantra.compose.ui.composable.widgets.coil.forwardingPainter(
press.mantra.compose.ui.composable.widgets.coil.forwardingPainter(
painter = rememberVectorPainter(Icons.Default.FaceRetouchingOff),
colorFilter = ColorFilter.tint(tintColor)
)
@@ -91,13 +91,13 @@ fun ProfileAvatar(
@Preview
@Composable
fun ProfileAvatarPreview() {
_root_ide_package_.press.mantra.compose.ui.theme.TorchTheme {
press.mantra.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {
ProfileAvatar(
publicKey = "hwgwefwase",
profile = _root_ide_package_.press.mantra.compose.database.model.Profile(
profile = press.mantra.compose.database.model.Profile(
publicKey = "",
nostrEventId = "referenced",
displayName = "Frank Talk",

View File

@@ -116,7 +116,7 @@ private fun AvailableWalletView(
) {
var showWalletEditDialog by remember { mutableStateOf(false) }
if (showWalletEditDialog) {
_root_ide_package_.press.mantra.compose.ui.composable.widgets.LoadingDataIndicator(
press.mantra.compose.ui.composable.widgets.LoadingDataIndicator(
text = "Edit function coming soon"
)
// EditWalletDialog(

View File

@@ -177,7 +177,7 @@ class ChatRoomListViewModel(
modifier = Modifier.fillMaxWidth(),
onClick = {
onNavigateToDirectMessageDetail.invoke(
_root_ide_package_.press.mantra.compose.ui.composable.navigation.routes.ChatRoomMessagingRoute(
press.mantra.compose.ui.composable.navigation.routes.ChatRoomMessagingRoute(
activeUserPublicKey = publicKey,
chatRoomId = localChatRoom.chatRoom.id,
relayHint = localChatRoom.localParticipants.firstOrNull { it.participant.participantPublicKey != localChatRoom.chatRoom.userPublicKey }?.participant?.relayHint

View File

@@ -149,7 +149,7 @@ class FeedListViewModel(
localNostrEvent.ListView(
onNavigateToEvent = { nostrEventId ->
onNavigateToEvent.invoke(
_root_ide_package_.press.mantra.compose.ui.composable.navigation.routes.NostrEventDetailRoute(
press.mantra.compose.ui.composable.navigation.routes.NostrEventDetailRoute(
activeUserPublicKey = activeUserPublicKey,
nostrEventId = nostrEventId
)

View File

@@ -68,7 +68,7 @@ class FollowersListViewModel(
// Sync Notifications... might want to also run this in the background
nostrRepository.queueNegentropySynchronizeRequest(
press.mantra.compose.nostr.Relays.DefaultDMRelayList.shuffled().map { normalizedRelayUrl ->
_root_ide_package_.press.mantra.compose.database.model.NegentropySynchronizeRequest(
press.mantra.compose.database.model.NegentropySynchronizeRequest(
id = press.mantra.compose.database.model.NegentropySynchronizeRequest.computeId(
relayURL = normalizedRelayUrl.url,
synchronizationFilter = synchronizationFilter

View File

@@ -67,7 +67,7 @@ class FollowingListViewModel(
// Sync Notifications... might want to also run this in the background
nostrRepository.queueNegentropySynchronizeRequest(
press.mantra.compose.nostr.Relays.DefaultDMRelayList.shuffled().map { normalizedRelayUrl ->
_root_ide_package_.press.mantra.compose.database.model.NegentropySynchronizeRequest(
press.mantra.compose.database.model.NegentropySynchronizeRequest(
id = press.mantra.compose.database.model.NegentropySynchronizeRequest.computeId(
relayURL = normalizedRelayUrl.url,
synchronizationFilter = synchronizationFilter

View File

@@ -78,7 +78,7 @@ class InReplyToViewModel(
nostrRepository.queueNegentropySynchronizeRequest(
publicRelays.take(3).map { normalizedRelayUrl ->
_root_ide_package_.press.mantra.compose.database.model.NegentropySynchronizeRequest(
press.mantra.compose.database.model.NegentropySynchronizeRequest(
id = press.mantra.compose.database.model.NegentropySynchronizeRequest.computeId(
relayURL = normalizedRelayUrl.url,
synchronizationFilter = synchronizationFilter
@@ -153,7 +153,7 @@ class InReplyToViewModel(
localNostrEvent.ListView(
onNavigateToEvent = { nostrEventId ->
onNavigateToEvent.invoke(
_root_ide_package_.press.mantra.compose.ui.composable.navigation.routes.NostrEventDetailRoute(
press.mantra.compose.ui.composable.navigation.routes.NostrEventDetailRoute(
activeUserPublicKey = activeUserPublicKey,
nostrEventId = nostrEventId
)
@@ -196,7 +196,7 @@ class InReplyToViewModel(
profile: press.mantra.compose.database.model.Profile?,
createdAt: Instant,
initialFeedListUIState: press.mantra.compose.ui.view.state.FeedListUIState = press.mantra.compose.ui.view.state.FeedListUIState.Loading,
synchronizationFilter: press.mantra.compose.database.model.types.SynchronizationFilter = _root_ide_package_.press.mantra.compose.database.model.types.SynchronizationFilter(
synchronizationFilter: press.mantra.compose.database.model.types.SynchronizationFilter = press.mantra.compose.database.model.types.SynchronizationFilter(
kinds = arrayOf(
TextNoteEvent.KIND,
ReactionEvent.KIND,

View File

@@ -127,7 +127,7 @@ class MetadataEventDetailViewModel(
metadataEventDetailType: MetadataEventDetailType
) = when (metadataEventDetailType) {
MetadataEventDetailType.Posts -> {
_root_ide_package_.press.mantra.compose.database.model.types.SynchronizationFilter(
press.mantra.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -139,7 +139,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Replies -> {
_root_ide_package_.press.mantra.compose.database.model.types.SynchronizationFilter(
press.mantra.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -152,7 +152,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Articles -> {
_root_ide_package_.press.mantra.compose.database.model.types.SynchronizationFilter(
press.mantra.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -163,7 +163,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Followers -> {
_root_ide_package_.press.mantra.compose.database.model.types.SynchronizationFilter(
press.mantra.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -175,7 +175,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Following -> {
_root_ide_package_.press.mantra.compose.database.model.types.SynchronizationFilter(
press.mantra.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -186,7 +186,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Zaps -> {
_root_ide_package_.press.mantra.compose.database.model.types.SynchronizationFilter(
press.mantra.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -198,7 +198,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Photos -> {
_root_ide_package_.press.mantra.compose.database.model.types.SynchronizationFilter(
press.mantra.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -209,7 +209,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Shorts -> {
_root_ide_package_.press.mantra.compose.database.model.types.SynchronizationFilter(
press.mantra.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -220,7 +220,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Videos -> {
_root_ide_package_.press.mantra.compose.database.model.types.SynchronizationFilter(
press.mantra.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -231,7 +231,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Bookmarks -> {
_root_ide_package_.press.mantra.compose.database.model.types.SynchronizationFilter(
press.mantra.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -242,7 +242,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Reports -> {
_root_ide_package_.press.mantra.compose.database.model.types.SynchronizationFilter(
press.mantra.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -253,7 +253,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Relays -> {
_root_ide_package_.press.mantra.compose.database.model.types.SynchronizationFilter(
press.mantra.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -294,11 +294,10 @@ class MetadataEventDetailViewModel(
ContactTag(eventPublicKey, null, null).toTagArray(),
)
}
val contactListTagList = listOf(AltTag.assemble(ContactListEvent.ALT)) +
followUsers.map { it }
val contactListTagList = followUsers.map { it }
nostrRepository.saveUnsignedNostrEvent(
_root_ide_package_.press.mantra.compose.database.model.UnsignedNostrEvent(
press.mantra.compose.database.model.UnsignedNostrEvent(
pubKey = activeUserPublicKey,
kind = ContactListEvent.KIND,
tags = contactListTagList.toTypedArray(),
@@ -325,7 +324,7 @@ class MetadataEventDetailViewModel(
logger.d("User is not being followed so no need to unfollow: $eventPublicKey")
} else {
nostrRepository.saveUnsignedNostrEvent(
_root_ide_package_.press.mantra.compose.database.model.UnsignedNostrEvent(
press.mantra.compose.database.model.UnsignedNostrEvent(
pubKey = activeUserPublicKey,
kind = ContactListEvent.KIND,
tags = contactListEvent.tags.filter { it.size > 1 && it[1] != eventPublicKey }

View File

@@ -37,10 +37,10 @@ class NostrEventDetailViewModel(
// Sync Notifications... might want to also run this in the background
nostrRepository.queueSynchronizeNostrEvent(
press.mantra.compose.nostr.Relays.DefaultDMRelayList.take(1).map { normalizedRelay -> // TODO: Sync from all relays instead of 1
_root_ide_package_.press.mantra.compose.database.model.SynchronizeNostrEventRequest(
press.mantra.compose.database.model.SynchronizeNostrEventRequest(
purpose = "detail",
synchronizationFilters = arrayOf(
_root_ide_package_.press.mantra.compose.database.model.types.SynchronizationFilter(
press.mantra.compose.database.model.types.SynchronizationFilter(
kinds = arrayOf(
TextNoteEvent.KIND,
RepostEvent.KIND,

View File

@@ -102,7 +102,7 @@ class SearchResultViewModel(
// Sync Notifications... might want to also run this in the background
searchRepository.submitSearch(
press.mantra.compose.nostr.Relays.eventFinderRelaySet.map { normalizedRelay -> // TODO: Search all relays instead of the first
_root_ide_package_.press.mantra.compose.database.model.SynchronizeNostrEventRequest(
press.mantra.compose.database.model.SynchronizeNostrEventRequest(
purpose = "search",
synchronizationFilters = arrayOf(
synchronizationFilter

View File

@@ -18,7 +18,7 @@ import kotlinx.coroutines.launch
class SignInToProfileViewModel(
initialWriteNewNoteUIState: press.mantra.compose.ui.view.state.SignInToProfileUIState,
val signInToProfileFormState: press.mantra.compose.ui.view.state.form.SignInToProfileFormState = _root_ide_package_.press.mantra.compose.ui.view.state.form.SignInToProfileFormState(),
val signInToProfileFormState: press.mantra.compose.ui.view.state.form.SignInToProfileFormState = press.mantra.compose.ui.view.state.form.SignInToProfileFormState(),
val nostrRepository: press.mantra.compose.repository.NostrRepository
): ViewModel() {
companion object {

View File

@@ -48,11 +48,11 @@ class SovereignWalletStartupViewModel(
state.value = StartupViewState.StartingBusiness(walletId)
val startResult: StartBusinessResult =
_root_ide_package_.press.mantra.compose.extensions.platformStartupLogic(
press.mantra.compose.extensions.platformStartupLogic(
words
)
_root_ide_package_.press.mantra.compose.extensions.schedulePlatformLogic(
press.mantra.compose.extensions.schedulePlatformLogic(
phoenixGlobal = phoenixGlobal,
)
when (startResult) {
@@ -69,7 +69,7 @@ class SovereignWalletStartupViewModel(
}
fun getShowIntroFlow(): Flow<Boolean> {
return _root_ide_package_.press.mantra.compose.extensions.getShowIntroFlow(phoenixGlobal)
return press.mantra.compose.extensions.getShowIntroFlow(phoenixGlobal)
}
companion object {

View File

@@ -213,7 +213,7 @@ class SovereignWalletViewModel(
}
fun getGlobalPrefs(): GlobalPrefs {
return _root_ide_package_.press.mantra.compose.extensions.getGlobalPrefs(
return press.mantra.compose.extensions.getGlobalPrefs(
phoenixGlobal
)
}

View File

@@ -56,10 +56,10 @@ class UnqueuedProfileSynchronizationViewModel(
nostrRepository.queueSynchronizeNostrEvent(
press.mantra.compose.nostr.Relays.DefaultDMRelayList.map { normalizedRelayUrl ->
_root_ide_package_.press.mantra.compose.database.model.SynchronizeNostrEventRequest(
press.mantra.compose.database.model.SynchronizeNostrEventRequest(
purpose = "sign-in",
synchronizationFilters = arrayOf(
_root_ide_package_.press.mantra.compose.database.model.types.SynchronizationFilter(
press.mantra.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(profilePublicKey),
kinds = arrayOf(
MetadataEvent.KIND,

View File

@@ -25,7 +25,7 @@ class WriteNewNoteViewModel(
val quotedNostrEventId: HexKey?,
initialWriteNewNoteUIState: press.mantra.compose.ui.view.state.WriteNewNoteUIState,
val writeNewNoteFormState: press.mantra.compose.ui.view.state.form.WriteNewNoteFormState = _root_ide_package_.press.mantra.compose.ui.view.state.form.WriteNewNoteFormState(),
val writeNewNoteFormState: press.mantra.compose.ui.view.state.form.WriteNewNoteFormState = press.mantra.compose.ui.view.state.form.WriteNewNoteFormState(),
val nostrRepository: press.mantra.compose.repository.NostrRepository
): ViewModel() {
companion object {

View File

@@ -4,23 +4,23 @@ android-compileSdk = "37"
android-minSdk = "26"
android-targetSdk = "37"
androidx-activity = "1.13.0"
androidx-appcompat = "1.7.1"
androidx-appcompat = "1.8.0"
androidx-core = "1.19.0"
androidx-espresso = "3.7.0"
androidx-lifecycle = "2.10.0"
androidx-lifecycle = "2.11.0"
androidx-testExt = "1.3.0"
coilCompose = "3.4.0"
composeHotReload = "1.1.1"
composeMultiplatform = "1.11.0"
coilCompose = "3.5.0"
composeHotReload = "1.2.0"
composeMultiplatform = "1.11.1"
datastorePreferences = "1.2.1"
junit = "4.13.2"
kermit = "2.1.0"
kotlin = "2.3.21"
kotlin = "2.4.10"
kotlinx-coroutines = "1.11.0"
kotlinx-datetime = "0.8.0"
kotlinxSerialization = "1.11.0"
ksp = "2.3.6"
ktor = "3.5.0"
ktor = "3.5.2"
# pinned to a commit, not master-SNAPSHOT: jitpack advertises a unique-snapshot maven-metadata for
# -SNAPSHOT versions but serves the files under their literal -SNAPSHOT names, so gradle looks for
# library-<target>-master-<sha>-1.klib and gets a 404. bump this when the fork moves.
@@ -30,14 +30,14 @@ material3 = "1.10.0-alpha05"
materialIconsCore = "1.7.3"
materialIconsExtended = "1.7.3"
navigationCompose = "2.9.2"
okhttp = "5.3.2"
okio = "3.17.0"
pagingCommon = "3.5.0"
okhttp = "5.4.0"
okio = "3.18.1"
pagingCommon = "3.5.1"
qrose = "1.1.2"
quartz = "1.12.6"
room3 = "3.0.0-alpha06"
quartz = "1.13.1"
room3 = "3.0.1"
sqldelight = "2.3.2"
sqlite = "2.6.2"
sqlite = "2.7.0"
workRuntimeKtx = "2.11.1"
[libraries]