Bug fix for the fork

This commit is contained in:
Kgothatso Ngako
2026-06-17 18:58:00 +03:00
parent bad1b0eb31
commit ccbabf394d
80 changed files with 352 additions and 347 deletions

View File

@@ -1,7 +1,5 @@
package at.torch.android
import at.torch.auxiliary.compose.AuxApp
import at.torch.auxiliary.compose.AuxGlobal
import at.torch.compose.PlatformContext
import android.content.Intent
import android.nfc.NfcAdapter
@@ -10,6 +8,8 @@ import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.navigation.compose.rememberNavController
import at.torch.compose.TorchApp
import at.torch.compose.TorchGlobal
import com.machankura.compose.ui.composable.widgets.nfc.NfcState
import com.machankura.compose.ui.composable.widgets.nfc.NfcStateRepository
import fr.acinq.phoenix.PhoenixGlobal
@@ -26,9 +26,9 @@ class MainActivity : ComponentActivity() {
setContent {
val navController = rememberNavController()
AuxApp(
TorchApp(
navController = navController,
auxGlobal = AuxGlobal(
torchGlobal = TorchGlobal(
platformContext = PlatformContext(
applicationContext = applicationContext
)

View File

@@ -1,6 +1,6 @@
package at.torch.compose
import at.torch.auxiliary.android.BuildConfig
import at.torch.android.BuildConfig
actual object AppVersion {
actual val versionName: String

View File

@@ -1,7 +1,7 @@
package at.torch.compose.ui.view.model
import at.torch.android.TorchApplication
import at.torch.auxiliary.compose.AppVersion
import at.torch.compose.AppVersion
import co.touchlab.kermit.Logger
import fr.acinq.bitcoin.MnemonicCode
import fr.acinq.lightning.crypto.LocalKeyManager

View File

@@ -17,8 +17,8 @@
package fr.acinq.phoenix.android
import at.torch.android.TorchApplication
import at.torch.auxiliary.compose.AppVersion
import at.torch.auxiliary.compose.ui.composable.widgets.wallet.WalletAvatars
import at.torch.compose.AppVersion
import at.torch.compose.ui.composable.widgets.wallet.WalletAvatars
import android.content.Context
import android.text.format.DateUtils
import fr.acinq.lightning.LiquidityEvents

View File

@@ -16,7 +16,7 @@
package fr.acinq.phoenix.android.services
import at.torch.auxiliary.android.BuildConfig
import at.torch.android.BuildConfig
import android.content.Context
import androidx.work.CoroutineWorker
import androidx.work.ExistingPeriodicWorkPolicy

View File

@@ -16,7 +16,7 @@
package fr.acinq.phoenix.android.services
import at.torch.auxiliary.android.BuildConfig
import at.torch.android.BuildConfig
import android.content.Context
import androidx.work.CoroutineWorker
import androidx.work.ExistingPeriodicWorkPolicy

View File

@@ -16,7 +16,7 @@
package fr.acinq.phoenix.android.services
import at.torch.auxiliary.android.BuildConfig
import at.torch.android.BuildConfig
import android.content.Context
import androidx.work.CoroutineWorker
import androidx.work.ExistingPeriodicWorkPolicy

View File

@@ -16,7 +16,7 @@
package fr.acinq.phoenix.android.services
import at.torch.auxiliary.android.BuildConfig
import at.torch.android.BuildConfig
import at.torch.android.TorchApplication
import android.content.Context
import android.os.Build

View File

@@ -1,6 +1,6 @@
package fr.acinq.phoenix.android.services
import at.torch.auxiliary.android.BuildConfig
import at.torch.android.BuildConfig
import at.torch.android.TorchApplication
import android.app.Service
import android.content.Intent

View File

@@ -1,6 +1,6 @@
package fr.acinq.phoenix.utils
import at.torch.auxiliary.android.BuildConfig
import at.torch.android.BuildConfig
import android.content.Context
import android.graphics.Bitmap
import android.graphics.BitmapFactory

View File

@@ -16,9 +16,9 @@
package fr.acinq.phoenix.utils
import at.torch.auxiliary.android.BuildConfig
import at.torch.android.BuildConfig
import at.torch.android.MainActivity
import at.torch.auxiliary.android.R
import at.torch.android.R
import android.Manifest
import android.app.Notification
import android.app.NotificationManager

View File

@@ -1,5 +1,5 @@
<resources>a
<string name="app_name">Aux</string>
<string name="app_name">Torch</string>
<string name="notification_channels_watcher_title">Channels watcher</string>
<string name="notification_channels_watcher_desc">Shows up when you need to start Phoenix.</string>

View File

@@ -26,7 +26,7 @@ fun at.torch.compose.database.model.UnsignedNostrEvent.signOrThrow(hexPrivateKey
tags = this.tags,
content = this.privateTags?.let { PrivateTagsInContent.encryptNip44(it, tempSigner) } ?: this.content
)
return _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
return NostrEvent(
id = event.id,
pubKey = event.pubKey,
kind = event.kind,

View File

@@ -77,7 +77,7 @@ abstract class NostrDao(
relayURLs.forEach { relayURL ->
database.broadcastNostrEventRequestDao().upsert(
_root_ide_package_.ac.cord.compose.database.model.BroadcastNostrEventRequest(
BroadcastNostrEventRequest(
nostrEventId = nostrEvent.id,
unsignedNostrEventId = nostrEvent.unsignedNostrEventId,
relayURL = relayURL
@@ -109,7 +109,7 @@ abstract class NostrDao(
} else {
// Nothing else needs to be done
val profile = database.profileDao().getProfileByPublicKey(nostrEvent.pubKey)
if (profile?.createdAt == _root_ide_package_.ac.cord.compose.database.GENESIS_AT && nostrEvent.kind == MetadataEvent.KIND) {
if (profile?.createdAt == GENESIS_AT && nostrEvent.kind == MetadataEvent.KIND) {
logger.i("This is a placeholder profile might need to get synced...: ${profile.publicKey}")
// Setup the sync here...
} else {
@@ -118,7 +118,7 @@ abstract class NostrDao(
}
database.nostrEventRelayDao().upsert(
_root_ide_package_.ac.cord.compose.database.model.NostrEventRelay(
NostrEventRelay(
relayURL = relayURL,
nostrEventId = nostrEvent.id
)
@@ -150,10 +150,10 @@ abstract class NostrDao(
val profile = database.profileDao().getProfileByPublicKey(nostrEvent.pubKey)
if (profile == null) {
val placeHolderProfile = _root_ide_package_.ac.cord.compose.database.model.Profile(
val placeHolderProfile = Profile(
displayName = "LOADING...",
publicKey = nostrEvent.pubKey,
createdAt = _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
createdAt = GENESIS_AT,
nostrEventId = nostrEvent.id, // Will get overwriting by sync,
)
database.profileDao().insertPlaceholderProfile(placeHolderProfile)
@@ -161,7 +161,7 @@ abstract class NostrDao(
profilePublicKeysToSync[relayURL] = mutableSetOf()
}
profilePublicKeysToSync[relayURL]?.add(nostrEvent.pubKey)
} else if (profile.createdAt == _root_ide_package_.ac.cord.compose.database.GENESIS_AT && level == 0) {
} else if (profile.createdAt == GENESIS_AT && level == 0) {
logger.i("This is a placeholder profile... that might need to get synced...: $profile")
if (profilePublicKeysToSync[relayURL] == null) {
profilePublicKeysToSync[relayURL] = mutableSetOf()
@@ -186,7 +186,7 @@ abstract class NostrDao(
database.nostrEventDao().insert(
if (containedPost != null) {
_root_ide_package_.ac.cord.compose.database.model.NostrEvent(
NostrEvent(
id = containedPost.id,
content = containedPost.content,
createdAt = Instant.fromEpochSeconds(containedPost.createdAt),
@@ -196,10 +196,10 @@ abstract class NostrDao(
tags = containedPost.tags
)
} else {
_root_ide_package_.ac.cord.compose.database.model.NostrEvent(
NostrEvent(
id = repostedRelation.repostedNostrEventId,
content = "Pending Sync",
createdAt = _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
createdAt = GENESIS_AT,
pubKey = nostrEvent.pubKey,
sig = "",
kind = nostrEvent.kind,
@@ -217,10 +217,10 @@ abstract class NostrDao(
if (repostedProfilePublicKey != null && repostedProfile == null) {
database.profileDao().insertPlaceholderProfile(
_root_ide_package_.ac.cord.compose.database.model.Profile(
Profile(
displayName = "LOADING...",
publicKey = repostedProfilePublicKey,
createdAt = _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
createdAt = GENESIS_AT,
nostrEventId = nostrEvent.id, // Will get overwriting by sync,
)
)
@@ -238,10 +238,10 @@ abstract class NostrDao(
val taggedNostrEvent = database.nostrEventDao().getNostrEventById(taggedEvent.eventId)
if (taggedNostrEvent == null) {
database.nostrEventDao().insert(
_root_ide_package_.ac.cord.compose.database.model.NostrEvent(
NostrEvent(
id = taggedEvent.eventId,
content = "Pending Sync... ",
createdAt = _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
createdAt = GENESIS_AT,
pubKey = nostrEvent.pubKey,
sig = "",
kind = nostrEvent.kind,
@@ -274,17 +274,17 @@ abstract class NostrDao(
if (taggedProfile == null) {
// Save a placeholder
database.profileDao().insertPlaceholderProfile(
_root_ide_package_.ac.cord.compose.database.model.Profile(
Profile(
displayName = "LOADING...",
publicKey = taggedUser.pubKey,
createdAt = _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
createdAt = GENESIS_AT,
nostrEventId = nostrEvent.id, // Will get overwriting by sync,
)
)
}
database.mentionDao().insert(
_root_ide_package_.ac.cord.compose.database.model.Mention(
Mention(
mentionedPublicKey = taggedUser.pubKey,
mentioningNostrEventId = nostrEvent.id,
relayUrl = taggedUser.relayHint?.url
@@ -316,10 +316,10 @@ abstract class NostrDao(
if (giftWrapReceiverProfile == null) {
// Save a placeholder
database.profileDao().insertPlaceholderProfile(
_root_ide_package_.ac.cord.compose.database.model.Profile(
Profile(
displayName = "LOADING...",
publicKey = giftWrapMessage.receiverPublicKey,
createdAt = _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
createdAt = GENESIS_AT,
nostrEventId = nostrEvent.id, // Will get overwriting by sync,
)
)
@@ -544,7 +544,7 @@ abstract class NostrDao(
activeKeyPair
).let { giftWrapSeal ->
if (giftWrapSeal == null) {
throw _root_ide_package_.ac.cord.compose.exceptions.GiftWrapUnsealException("Failed to unseal ${nostrEvent.id} from the giftWrap")
throw GiftWrapUnsealException("Failed to unseal ${nostrEvent.id} from the giftWrap")
} else {
database.giftWrapSealDao().upsert(
giftWrapSeal
@@ -554,13 +554,13 @@ abstract class NostrDao(
activeKeyPair.privKey!!
).let { decryptedGiftWrapPayload ->
if (decryptedGiftWrapPayload == null) {
throw _root_ide_package_.ac.cord.compose.exceptions.GiftWrapSealDecryptionException(
throw GiftWrapSealDecryptionException(
"Failed to decrypt sealed ${giftWrapSeal.id} payload"
)
} else {
if (giftWrapSeal.publicKey.lowercase() != decryptedGiftWrapPayload.publicKey.lowercase()) {
val giftWrapImpersonation =
_root_ide_package_.ac.cord.compose.exceptions.GiftWrapImpersonationException(
GiftWrapImpersonationException(
"Seal pubkey (${giftWrapSeal.publicKey}) and payload pubkey (${decryptedGiftWrapPayload.publicKey}) needs to be the same for the giftWrap ${nostrEvent.id}"
)
logger.e("Impersonation", giftWrapImpersonation)
@@ -591,7 +591,7 @@ abstract class NostrDao(
if (localChatRoom == null) {
val userPublicKey = activeKeyPair.pubKey.toHex()
database.chatRoomDao().upsert(
_root_ide_package_.ac.cord.compose.database.model.ChatRoom(
ChatRoom(
id = chatRoomId,
userPublicKey = userPublicKey,
subject = decryptedGiftWrapPayload.parseSubject(),
@@ -604,7 +604,7 @@ abstract class NostrDao(
val participants = giftWrapPayload.participantPTags(
NormalizedRelayUrl(relayURL) // TODO: Get relayURL for publicKey profile...
).map {
_root_ide_package_.ac.cord.compose.database.model.Participant(
Participant(
participantPublicKey = it.pubKey,
chatRoomId = chatRoomId,
relayHint = it.relayHint?.url
@@ -620,10 +620,10 @@ abstract class NostrDao(
if (giftWrapParticipantProfile == null) {
// Save a placeholder
database.profileDao().insertPlaceholderProfile(
_root_ide_package_.ac.cord.compose.database.model.Profile(
Profile(
displayName = "LOADING...",
publicKey = participant.participantPublicKey,
createdAt = _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
createdAt = GENESIS_AT,
nostrEventId = nostrEvent.id, // Will get overwriting by sync,
)
)
@@ -668,7 +668,7 @@ abstract class NostrDao(
authors = arrayOf(
publicKey
),
since = _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
since = GENESIS_AT,
limit = 5
).firstOrNull()?.let { nostrEvent ->
if (nostrEvent.kind != ChatMessageRelayListEvent.KIND) {
@@ -689,7 +689,7 @@ abstract class NostrDao(
if (chatMessageRelayListEvent != null) {
// Sync messages from this relay that were sent by us
val synchronizationFilter =
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
SynchronizationFilter(
kinds = arrayOf(
GiftWrapEvent.KIND,
),
@@ -708,8 +708,8 @@ abstract class NostrDao(
.insert(
chatMessageRelayListEvent.relays()
.map { normalizedRelayUrl ->
_root_ide_package_.ac.cord.compose.database.model.NegentropySynchronizeRequest(
id = _root_ide_package_.at.torch.compose.database.model.NegentropySynchronizeRequest.Companion.computeId(
NegentropySynchronizeRequest(
id = NegentropySynchronizeRequest.Companion.computeId(
relayURL = normalizedRelayUrl.url,
synchronizationFilter = synchronizationFilter
),
@@ -749,7 +749,7 @@ abstract class NostrDao(
}
val chatMessageId = database.chatMessageDao().upsert(
_root_ide_package_.ac.cord.compose.database.model.ChatMessage(
ChatMessage(
giftWrapPayloadId = giftWrapPayload.id,
senderPublicKey = giftWrapPayload.publicKey,
isUserMessage = activeKeyPair.pubKey.toHex() == giftWrapPayload.publicKey,
@@ -761,7 +761,7 @@ abstract class NostrDao(
val broadcastNostrEventReceiptId =
database.broadcastNostrEventReceiptDao().upsert(
_root_ide_package_.ac.cord.compose.database.model.BroadcastNostrEventReceipt(
BroadcastNostrEventReceipt(
nostrEventId = nostrEvent.id,
isAccepted = true,
isSync = true,
@@ -771,7 +771,7 @@ abstract class NostrDao(
database.chatMessageBroadcastNostrEventReceiptRelationDao()
.upsert(
_root_ide_package_.ac.cord.compose.database.model.ChatMessageBroadcastNostrEventReceiptRelation(
ChatMessageBroadcastNostrEventReceiptRelation(
broadcastNostrEventReceiptId = broadcastNostrEventReceiptId,
chatMessageId = chatMessageId
)
@@ -794,9 +794,9 @@ abstract class NostrDao(
// Persist PlaceHolder and sync
// TODO: Get replyingToAuthorPublicKey
database.postDao().insert(
_root_ide_package_.ac.cord.compose.database.model.Post(
Post(
id = post.replyToId,
createdAt = _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
createdAt = GENESIS_AT,
nostrEventId = nostrEvent.id, // Will get overwriting by sync handled by tagged events...
content = post.replyToId,
profilePublicKey = nostrEvent.pubKey // Will get overwriting by sync handled by tagged events...
@@ -814,9 +814,9 @@ abstract class NostrDao(
if (replyingToPost == null) {
// Persist PlaceHolder and sync
database.postDao().insert(
_root_ide_package_.ac.cord.compose.database.model.Post(
Post(
id = reaction.replyToId,
createdAt = _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
createdAt = GENESIS_AT,
nostrEventId = nostrEvent.id, // Will get overwriting by sync handled by tagged events...
content = reaction.replyToId,
profilePublicKey = nostrEvent.pubKey // Will get overwriting by sync handled by tagged events...
@@ -836,10 +836,10 @@ abstract class NostrDao(
eventIdsToSync[relayURL]?.add(quotedRelation.quotedNostrEventId)
database.nostrEventDao().insert(
_root_ide_package_.ac.cord.compose.database.model.NostrEvent(
NostrEvent(
id = quotedRelation.quotedNostrEventId,
content = "Pending Sync",
createdAt = _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
createdAt = GENESIS_AT,
pubKey = nostrEvent.pubKey,
sig = "",
kind = nostrEvent.kind,
@@ -856,10 +856,10 @@ abstract class NostrDao(
if (quotedProfilePublicKey != null && quotedProfile == null) {
database.profileDao().insertPlaceholderProfile(
_root_ide_package_.ac.cord.compose.database.model.Profile(
Profile(
displayName = "LOADING...",
publicKey = quotedProfilePublicKey,
createdAt = _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
createdAt = GENESIS_AT,
nostrEventId = nostrEvent.id, // Will get overwriting by sync,
)
)
@@ -884,10 +884,10 @@ abstract class NostrDao(
eventIdsToSync[relayURL]?.add(inReplyToRelation.inReplyToNostrEventId)
database.nostrEventDao().insert(
_root_ide_package_.ac.cord.compose.database.model.NostrEvent(
NostrEvent(
id = inReplyToRelation.inReplyToNostrEventId,
content = "Pending Sync",
createdAt = _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
createdAt = GENESIS_AT,
pubKey = nostrEvent.pubKey,
sig = "",
kind = nostrEvent.kind,
@@ -918,10 +918,10 @@ abstract class NostrDao(
if (inReplyToRootProfilePublicKey != null && inReplyToProfile == null) {
database.profileDao().insertPlaceholderProfile(
_root_ide_package_.ac.cord.compose.database.model.Profile(
Profile(
displayName = "LOADING...",
publicKey = inReplyToRootProfilePublicKey,
createdAt = _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
createdAt = GENESIS_AT,
nostrEventId = nostrEvent.id, // Will get overwriting by sync,
)
)
@@ -942,9 +942,9 @@ abstract class NostrDao(
if (zappedPost == null) {
// Persist PlaceHolder and sync
database.postDao().insert(
_root_ide_package_.ac.cord.compose.database.model.Post(
Post(
id = zap.postId,
createdAt = _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
createdAt = GENESIS_AT,
nostrEventId = nostrEvent.id, // Will get overwriting by sync,
content = zap.postId,
profilePublicKey = nostrEvent.pubKey // Will get overwriting by sync,
@@ -979,10 +979,10 @@ abstract class NostrDao(
if (profile == null) {
val placeHolderProfile =
_root_ide_package_.ac.cord.compose.database.model.Profile(
Profile(
displayName = "LOADING...",
publicKey = followedHexKEys,
createdAt = _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
createdAt = GENESIS_AT,
nostrEventId = nostrEvent.id, // Will get overwriting by sync,
)
database.profileDao().insertPlaceholderProfile(placeHolderProfile)
@@ -990,7 +990,7 @@ abstract class NostrDao(
profilePublicKeysToSync[relayURL] = mutableSetOf()
}
profilePublicKeysToSync[relayURL]?.add(followedHexKEys)
} else if (profile.createdAt == _root_ide_package_.ac.cord.compose.database.GENESIS_AT && level == 0) {
} else if (profile.createdAt == GENESIS_AT && level == 0) {
logger.i("${level} This is a placeholder profile... that might need to get synced...: $profile")
if (profilePublicKeysToSync[relayURL] == null) {
@@ -1001,7 +1001,7 @@ abstract class NostrDao(
// Save profile connections...
database.connectionDao().upsert(
_root_ide_package_.ac.cord.compose.database.model.Connection(
Connection(
sourcePublicKey = nostrEvent.pubKey,
destinationPublicKey = followedHexKEys,
nostrEventId = nostrEvent.id
@@ -1012,15 +1012,15 @@ abstract class NostrDao(
}
if (level == 0) {
val negentropySynchronizeRequests = mutableListOf<at.torch.compose.database.model.NegentropySynchronizeRequest>()
val negentropySynchronizeRequests = mutableListOf<NegentropySynchronizeRequest>()
profilePublicKeysToSync.forEach { relayUrlProfilePublicKey ->
val synchronizationFilter =
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
SynchronizationFilter(
authors = relayUrlProfilePublicKey.value.toTypedArray(),
kinds = profileEventKinds
)
negentropySynchronizeRequests.add(
_root_ide_package_.ac.cord.compose.database.model.NegentropySynchronizeRequest(
NegentropySynchronizeRequest(
id = _root_ide_package_.at.torch.compose.database.model.NegentropySynchronizeRequest.Companion.computeId(
relayUrlProfilePublicKey.key,
synchronizationFilter
@@ -1036,12 +1036,12 @@ abstract class NostrDao(
eventIdsToSync.forEach { relayUrlEventIds ->
// TODO: Hash relayUrl + synchronicationFilter + ephocMinutes
val synchronizationFilter =
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
SynchronizationFilter(
ids = relayUrlEventIds.value.toTypedArray(),
)
Clock.System.now().toEpochMilliseconds()
negentropySynchronizeRequests.add(
_root_ide_package_.ac.cord.compose.database.model.NegentropySynchronizeRequest(
NegentropySynchronizeRequest(
id = _root_ide_package_.at.torch.compose.database.model.NegentropySynchronizeRequest.Companion.computeId(
relayUrlEventIds.key,
synchronizationFilter

View File

@@ -48,7 +48,7 @@ abstract class NostrNip17Dao(
if (profiles.isNotEmpty()) {
// Create new chatRoom
val chatRoom = _root_ide_package_.ac.cord.compose.database.model.ChatRoom(
val chatRoom = _root_ide_package_.at.torch.compose.database.model.ChatRoom(
id = chatRoomId,
userPublicKey = activeUserPublicKey,
subject = defaultSubject,
@@ -57,7 +57,7 @@ abstract class NostrNip17Dao(
database.participantDao().upsert(
profiles.map {
_root_ide_package_.ac.cord.compose.database.model.Participant(
_root_ide_package_.at.torch.compose.database.model.Participant(
participantPublicKey = it.publicKey,
chatRoomId = chatRoomId,
relayHint = relayHint
@@ -65,7 +65,7 @@ abstract class NostrNip17Dao(
}
)
return _root_ide_package_.ac.cord.compose.database.model.intermdiate.LocalChatRoom(
return _root_ide_package_.at.torch.compose.database.model.intermdiate.LocalChatRoom(
chatRoom = chatRoom
)
}
@@ -81,7 +81,7 @@ abstract class NostrNip17Dao(
giftWrapEvent: GiftWrapEvent,
receiverPublicKey: PTag
) {
val nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
val nostrEvent = _root_ide_package_.at.torch.compose.database.model.NostrEvent(
id = giftWrapEvent.id,
content = giftWrapEvent.content,
createdAt = Instant.fromEpochSeconds(giftWrapEvent.createdAt),
@@ -99,7 +99,7 @@ abstract class NostrNip17Dao(
chatMessage?.let {
database.chatMessageNostrEventRelationDao().upsert(
_root_ide_package_.ac.cord.compose.database.model.ChatMessageNostrEventRelation(
_root_ide_package_.at.torch.compose.database.model.ChatMessageNostrEventRelation(
chatMessageId = it.id,
nostrEventId = nostrEvent.id
)
@@ -112,7 +112,7 @@ abstract class NostrNip17Dao(
authors = arrayOf(
receiverPublicKey.pubKey
),
since = _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
since = _root_ide_package_.at.torch.compose.database.GENESIS_AT,
limit = 5
)
logger.d("Found messageRelayLists: $chatMessageRelayListEvents")
@@ -134,7 +134,7 @@ abstract class NostrNip17Dao(
logger.d("Submit BroadcastNostrEventRequest to $relayUrl")
val broadcastNostrEventRequestIds = database.broadcastNostrEventRequestDao().insert(
listOf(
_root_ide_package_.ac.cord.compose.database.model.BroadcastNostrEventRequest(
_root_ide_package_.at.torch.compose.database.model.BroadcastNostrEventRequest(
nostrEventId = nostrEvent.id,
relayURL = relayUrl.url
)
@@ -144,7 +144,7 @@ abstract class NostrNip17Dao(
chatMessage?.let {
broadcastNostrEventRequestIds.forEach {
database.chatMessageBroadcastNostrEventRequestRelationDao().upsert(
_root_ide_package_.ac.cord.compose.database.model.ChatMessageBroadcastNostrEventRequestRelation(
_root_ide_package_.at.torch.compose.database.model.ChatMessageBroadcastNostrEventRequestRelation(
chatMessageId = chatMessage.id,
broadcastNostrEventRequestId = it
)
@@ -159,7 +159,7 @@ abstract class NostrNip17Dao(
database.giftWrapMessageDao().upsert(
_root_ide_package_.ac.cord.compose.database.model.GiftWrapMessage(
_root_ide_package_.at.torch.compose.database.model.GiftWrapMessage(
id = giftWrapEvent.id,
nostrEventId = nostrEvent.id,
content = giftWrapEvent.content,
@@ -173,7 +173,7 @@ abstract class NostrNip17Dao(
)
database.giftWrapSealDao().upsert(
_root_ide_package_.ac.cord.compose.database.model.GiftWrapSeal(
_root_ide_package_.at.torch.compose.database.model.GiftWrapSeal(
id = sealedRumorEvent.id,
publicKey = sealedRumorEvent.pubKey,
content = sealedRumorEvent.content,

View File

@@ -11,7 +11,7 @@ import kotlin.time.Instant
@Dao
interface ProfileDao {
@Query("SELECT * FROM Profile WHERE createdAt > :createdAt LIMIT :limit")
fun getAllProfiles(limit: Int = 21, createdAt: Instant = _root_ide_package_.ac.cord.compose.database.GENESIS_AT): List<at.torch.compose.database.model.Profile>
fun getAllProfiles(limit: Int = 21, createdAt: Instant = _root_ide_package_.at.torch.compose.database.GENESIS_AT): List<at.torch.compose.database.model.Profile>
@Query("SELECT * FROM NostrEvent WHERE kind = 0 AND content LIKE '%' || :searchTerm || '%' LIMIT :limit")
fun filterProfiles(searchTerm: String, limit: Int = 21): List<at.torch.compose.database.model.intermdiate.LocalProfile>

View File

@@ -134,7 +134,7 @@ data class Profile(
),
onClick = {
onNavigateToEvent.invoke(
_root_ide_package_.ac.cord.compose.ui.composable.navigation.routes.NostrEventDetailRoute(
_root_ide_package_.at.torch.compose.ui.composable.navigation.routes.NostrEventDetailRoute(
activeUserPublicKey = activeUserPublicKey,
nostrEventId
)
@@ -152,7 +152,7 @@ data class Profile(
Column(
modifier = Modifier.padding(4.dp)
) {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.profile.ProfileAvatar(
_root_ide_package_.at.torch.compose.ui.composable.widgets.profile.ProfileAvatar(
publicKey = publicKey,
profile = this@Profile
)
@@ -196,7 +196,7 @@ fun ProfileRenderAsListItemPreview(
about = "I am the stone that the builder refused.",
nostrEventId = "nostrEventId"
)
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {

View File

@@ -50,7 +50,7 @@ data class LocalInReplyToNostrEvent(
) {
val profile = profile
_root_ide_package_.ac.cord.compose.ui.composable.widgets.profile.ProfileAvatar(
_root_ide_package_.at.torch.compose.ui.composable.widgets.profile.ProfileAvatar(
profile = profile,
publicKey = nostrEvent.pubKey
)

View File

@@ -67,7 +67,7 @@ data class LocalNostrEvent(
) {
val profile = profile
_root_ide_package_.ac.cord.compose.ui.composable.widgets.profile.ProfileAvatar(
_root_ide_package_.at.torch.compose.ui.composable.widgets.profile.ProfileAvatar(
profile = profile,
publicKey = nostrEvent.pubKey
)
@@ -88,7 +88,7 @@ data class LocalNostrEvent(
}
}
}
_root_ide_package_.ac.cord.compose.ui.composable.widgets.content.RichContent(
_root_ide_package_.at.torch.compose.ui.composable.widgets.content.RichContent(
modifier = Modifier.fillMaxWidth().padding(
horizontal = 20.dp
),

View File

@@ -61,7 +61,7 @@ data class LocalQuotedNostrEvent(
horizontalArrangement = Arrangement.spacedBy(10.dp, Alignment.Start),
verticalAlignment = Alignment.CenterVertically
) {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.profile.ProfileAvatar(
_root_ide_package_.at.torch.compose.ui.composable.widgets.profile.ProfileAvatar(
publicKey = nostrEvent.pubKey,
profile = profile
)
@@ -88,7 +88,7 @@ data class LocalQuotedNostrEvent(
horizontal = 10.dp
)
) {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.content.RichContent(
_root_ide_package_.at.torch.compose.ui.composable.widgets.content.RichContent(
nostrEvent = nostrEvent,
localQuotedNostrEvent = null,
mentionedProfiles = mentionedProfiles,
@@ -112,12 +112,12 @@ data class LocalQuotedNostrEvent(
@Preview
@Composable
private fun LocalQuotedNostrEventPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {
LocalQuotedNostrEvent(
nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
nostrEvent = _root_ide_package_.at.torch.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",
@@ -125,12 +125,12 @@ private fun LocalQuotedNostrEventPreview() {
sig = "hexsig",
tags = emptyArray()
),
quotedRelation = _root_ide_package_.ac.cord.compose.database.model.QuotedRelation(
quotedRelation = _root_ide_package_.at.torch.compose.database.model.QuotedRelation(
quotingNostrEventId = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a520",
quotedProfilePublicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
quotedNostrEventId = "1c7213118d4e17c6bad5c6b11125f005619bc3e43374affb9cd6483f665fd5e6"
),
profile = _root_ide_package_.ac.cord.compose.database.model.Profile(
profile = _root_ide_package_.at.torch.compose.database.model.Profile(
publicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
nostrEventId = "referenced",
displayName = "Steve Biko"

View File

@@ -50,7 +50,7 @@ data class LocalRepostedNostrEvent(
) {
val profile = profile
_root_ide_package_.ac.cord.compose.ui.composable.widgets.profile.ProfileAvatar(
_root_ide_package_.at.torch.compose.ui.composable.widgets.profile.ProfileAvatar(
profile = profile,
publicKey = nostrEvent.pubKey
)

View File

@@ -70,7 +70,7 @@ class DatabaseChatRepository(
authors = arrayOf(
publicKey
),
since = _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
since = _root_ide_package_.at.torch.compose.database.GENESIS_AT,
limit = 5
).firstOrNull()?.let { nostrEvent ->
if (nostrEvent.kind != ChatMessageRelayListEvent.KIND) {
@@ -106,7 +106,7 @@ class DatabaseChatRepository(
}
val giftWrapPayloadId = database.giftWrapPayloadDao().upsert(
_root_ide_package_.ac.cord.compose.database.model.GiftWrapPayload(
_root_ide_package_.at.torch.compose.database.model.GiftWrapPayload(
kind = messageType,
tags = receiverTags.toTypedArray(),
content = text,
@@ -115,7 +115,7 @@ class DatabaseChatRepository(
)
)
database.chatMessageDao().upsert(
_root_ide_package_.ac.cord.compose.database.model.ChatMessage(
_root_ide_package_.at.torch.compose.database.model.ChatMessage(
content = text,
chatRoomId = localChatRoom.chatRoom.id,
senderPublicKey = localChatRoom.chatRoom.userPublicKey,

View File

@@ -105,7 +105,7 @@ class DatabaseNostrRepository(
)
val unsignedNostrEvents = mutableListOf(
_root_ide_package_.ac.cord.compose.database.model.UnsignedNostrEvent(
_root_ide_package_.at.torch.compose.database.model.UnsignedNostrEvent(
pubKey = publicKey,
kind = profileEventTemplate.kind,
createdAt = Instant.fromEpochSeconds(profileEventTemplate.createdAt),
@@ -120,7 +120,7 @@ class DatabaseNostrRepository(
followUsers.map { it.toTagArray() }
unsignedNostrEvents.add(
_root_ide_package_.ac.cord.compose.database.model.UnsignedNostrEvent(
_root_ide_package_.at.torch.compose.database.model.UnsignedNostrEvent(
pubKey = publicKey,
kind = ContactListEvent.KIND,
tags = contactListTagList.toTypedArray(),
@@ -131,7 +131,7 @@ class DatabaseNostrRepository(
)
unsignedNostrEvents.add(
_root_ide_package_.ac.cord.compose.database.model.UnsignedNostrEvent(
_root_ide_package_.at.torch.compose.database.model.UnsignedNostrEvent(
pubKey = publicKey,
kind = ChatMessageRelayListEvent.KIND,
tags = ChatMessageRelayListEvent.createTagArray(
@@ -142,7 +142,7 @@ class DatabaseNostrRepository(
)
unsignedNostrEvents.add(
_root_ide_package_.ac.cord.compose.database.model.UnsignedNostrEvent(
_root_ide_package_.at.torch.compose.database.model.UnsignedNostrEvent(
pubKey = publicKey,
kind = AdvertisedRelayListEvent.KIND,
tags = _root_ide_package_.at.torch.compose.nostr.Relays.DefaultNIP65List.map { it.toTagArray() }
@@ -154,7 +154,7 @@ class DatabaseNostrRepository(
unsignedNostrEvents.add(
_root_ide_package_.ac.cord.compose.database.model.UnsignedNostrEvent(
_root_ide_package_.at.torch.compose.database.model.UnsignedNostrEvent(
pubKey = publicKey,
kind = SearchRelayListEvent.KIND,
tags = _root_ide_package_.at.torch.compose.nostr.Relays.DefaultSearchRelayList.map {
@@ -171,7 +171,7 @@ class DatabaseNostrRepository(
)
unsignedNostrEvents.add(
_root_ide_package_.ac.cord.compose.database.model.UnsignedNostrEvent(
_root_ide_package_.at.torch.compose.database.model.UnsignedNostrEvent(
pubKey = publicKey,
kind = IndexerRelayListEvent.KIND,
tags = arrayOf(AltTag.assemble(IndexerRelayListEvent.ALT)),
@@ -185,7 +185,7 @@ class DatabaseNostrRepository(
)
unsignedNostrEvents.add(
_root_ide_package_.ac.cord.compose.database.model.UnsignedNostrEvent(
_root_ide_package_.at.torch.compose.database.model.UnsignedNostrEvent(
pubKey = publicKey,
kind = ChannelListEvent.KIND,
tags = arrayOf(
@@ -200,7 +200,7 @@ class DatabaseNostrRepository(
)
unsignedNostrEvents.add(
_root_ide_package_.ac.cord.compose.database.model.UnsignedNostrEvent(
_root_ide_package_.at.torch.compose.database.model.UnsignedNostrEvent(
pubKey = publicKey,
kind = RelayFeedsListEvent.KIND,
tags = arrayOf(
@@ -224,13 +224,13 @@ class DatabaseNostrRepository(
val profileEventTemplate = MetadataEvent.createNew()
saveUnsignedNostrEvent(
_root_ide_package_.ac.cord.compose.database.model.UnsignedNostrEvent(
_root_ide_package_.at.torch.compose.database.model.UnsignedNostrEvent(
pubKey = publicKey,
kind = profileEventTemplate.kind,
createdAt = Instant.fromEpochSeconds(profileEventTemplate.createdAt),
tags = profileEventTemplate.tags,
content = profileEventTemplate.content,
signedAt = _root_ide_package_.ac.cord.compose.database.GENESIS_AT // This will keep us from trying to sign this event... but we should automatically sync the npub profile
signedAt = _root_ide_package_.at.torch.compose.database.GENESIS_AT // This will keep us from trying to sign this event... but we should automatically sync the npub profile
)
)
}
@@ -329,7 +329,7 @@ class DatabaseNostrRepository(
val unsignedNostrEvent = saveUnsignedNostrEvent(
_root_ide_package_.ac.cord.compose.database.model.UnsignedNostrEvent(
_root_ide_package_.at.torch.compose.database.model.UnsignedNostrEvent(
pubKey = publicKey,
kind = textNote.kind,
createdAt = Instant.fromEpochSeconds(textNote.createdAt),
@@ -407,7 +407,7 @@ class DatabaseNostrRepository(
if (status == "published") {
val broadcastNostrEventReceiptId = database.broadcastNostrEventReceiptDao().upsert(
_root_ide_package_.ac.cord.compose.database.model.BroadcastNostrEventReceipt(
_root_ide_package_.at.torch.compose.database.model.BroadcastNostrEventReceipt(
nostrEventId = broadcastNostrEventRequest.nostrEventId,
unsignedNostrEventId = broadcastNostrEventRequest.unsignedNostrEventId,
isAccepted = true,
@@ -420,7 +420,7 @@ class DatabaseNostrRepository(
)?.let { chatMessageBroadcastNostrEventRequestRelation ->
// This is actually a chatMessage related broadcast event...
database.chatMessageBroadcastNostrEventReceiptRelationDao().upsert(
_root_ide_package_.ac.cord.compose.database.model.ChatMessageBroadcastNostrEventReceiptRelation(
_root_ide_package_.at.torch.compose.database.model.ChatMessageBroadcastNostrEventReceiptRelation(
chatMessageId = chatMessageBroadcastNostrEventRequestRelation.chatMessageId,
broadcastNostrEventReceiptId = broadcastNostrEventReceiptId
)
@@ -616,7 +616,7 @@ class DatabaseNostrRepository(
database.nostrEventDao().getFilteredNostrEvents(
kinds = synchronizationFilter.kinds,
search = synchronizationFilter.search,
since = synchronizationFilter.since ?: _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
since = synchronizationFilter.since ?: _root_ide_package_.at.torch.compose.database.GENESIS_AT,
limit = if (applyLimits) {
synchronizationFilter.limit ?: 50
} else {
@@ -629,7 +629,7 @@ class DatabaseNostrRepository(
database.nostrEventDao().getFilteredNostrEvents(
kinds = synchronizationFilter.kinds,
ids = synchronizationFilter.ids,
since = synchronizationFilter.since ?: _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
since = synchronizationFilter.since ?: _root_ide_package_.at.torch.compose.database.GENESIS_AT,
limit = if (applyLimits) {
synchronizationFilter.limit ?: 50
} else {
@@ -641,7 +641,7 @@ class DatabaseNostrRepository(
logger.d("getNostrEventsByIds($applyLimits): $synchronizationFilter")
database.nostrEventDao().getNostrEventsByIds(
ids = synchronizationFilter.ids,
since = synchronizationFilter.since ?: _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
since = synchronizationFilter.since ?: _root_ide_package_.at.torch.compose.database.GENESIS_AT,
limit = if (applyLimits) {
synchronizationFilter.limit ?: 50
} else {
@@ -654,7 +654,7 @@ class DatabaseNostrRepository(
database.nostrEventDao().getAuthoredNostrEvents(
kinds = synchronizationFilter.kinds,
authors = synchronizationFilter.authors,
since = synchronizationFilter.since ?: _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
since = synchronizationFilter.since ?: _root_ide_package_.at.torch.compose.database.GENESIS_AT,
limit = if (applyLimits) {
synchronizationFilter.limit ?: 50
} else {
@@ -680,7 +680,7 @@ class DatabaseNostrRepository(
database.nostrEventDao().getPublicKeyMentionedNostrEvents(
kinds = synchronizationFilter.kinds,
publicKey = synchronizationFilter.tags["p"]?.first()!!,
since = synchronizationFilter.since ?: _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
since = synchronizationFilter.since ?: _root_ide_package_.at.torch.compose.database.GENESIS_AT,
limit = if (applyLimits) {
synchronizationFilter.limit ?: 50
} else {
@@ -694,7 +694,7 @@ class DatabaseNostrRepository(
kinds = arrayOf(
TextNoteEvent.KIND,
),
since = synchronizationFilter.since ?: _root_ide_package_.ac.cord.compose.database.GENESIS_AT,
since = synchronizationFilter.since ?: _root_ide_package_.at.torch.compose.database.GENESIS_AT,
limit = if (applyLimits) {
synchronizationFilter.limit ?: 50
} else {
@@ -743,7 +743,7 @@ class DatabaseNostrRepository(
synchronizationFilterArray: at.torch.compose.database.model.typealiases.SynchronizationFilterArray?
) {
database.recentSearchDao().upsert(
_root_ide_package_.ac.cord.compose.database.model.RecentSearch(
_root_ide_package_.at.torch.compose.database.model.RecentSearch(
query = query,
synchronizationFilters = synchronizationFilterArray
)

View File

@@ -66,6 +66,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_.ac.cord.compose.exceptions.InvalidNostrPrivateKeyException()
throw _root_ide_package_.at.torch.compose.exceptions.InvalidNostrPrivateKeyException()
}
}

View File

@@ -6,7 +6,7 @@ class AuxDatabaseManager(
torchGlobal: at.torch.compose.TorchGlobal
) {
val auxDatabase by lazy {
_root_ide_package_.ac.cord.compose.database.builder.getRoomDatabase(
_root_ide_package_.at.torch.compose.database.builder.getRoomDatabase(
_root_ide_package_.at.torch.compose.database.builder.PlatformDatabaseBuilder.getDatabaseBuilder(
torchGlobal.platformContext
)
@@ -19,7 +19,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_.ac.cord.compose.database.builder.getRoomDatabase(
_root_ide_package_.at.torch.compose.database.builder.getRoomDatabase(
_root_ide_package_.at.torch.compose.database.builder.PlatformDatabaseBuilder.getInMemoryDatabaseBuilder(
torchGlobal.platformContext
)

View File

@@ -190,7 +190,7 @@ class RelayPool(
val filterRequest = OptimizedJsonMapper.toJson(reqCommand)
if (nostrSocketClient == null) {
throw _root_ide_package_.ac.cord.compose.exceptions.NetworkException("$relayUrl is not connected")
throw _root_ide_package_.at.torch.compose.exceptions.NetworkException("$relayUrl is not connected")
}
return coroutineScope {
val eventFlow = nostrSocketClient.queryAsFlow(reqCommand.subId)
@@ -214,7 +214,7 @@ class RelayPool(
val negentropySyncRequest = OptimizedJsonMapper.toJson(negOpenCmd)
if (nostrSocketClient == null) {
throw _root_ide_package_.ac.cord.compose.exceptions.NetworkException("$relayUrl is not connected")
throw _root_ide_package_.at.torch.compose.exceptions.NetworkException("$relayUrl is not connected")
}
return coroutineScope {
val eventFlow = nostrSocketClient.queryAsFlow(negOpenCmd.subId)
@@ -237,7 +237,7 @@ class RelayPool(
val closeSubscription = OptimizedJsonMapper.toJson(closeCmd)
if (nostrSocketClient == null) {
throw _root_ide_package_.ac.cord.compose.exceptions.NetworkException("$relayUrl is not connected")
throw _root_ide_package_.at.torch.compose.exceptions.NetworkException("$relayUrl is not connected")
}
coroutineScope {
with(nostrSocketClient) {
@@ -259,7 +259,7 @@ class RelayPool(
val closeNegentropySubscription = OptimizedJsonMapper.toJson(negCloseCmd)
if (nostrSocketClient == null) {
throw _root_ide_package_.ac.cord.compose.exceptions.NetworkException("$relayUrl is not connected")
throw _root_ide_package_.at.torch.compose.exceptions.NetworkException("$relayUrl is not connected")
}
coroutineScope {
with(nostrSocketClient) {
@@ -337,7 +337,7 @@ class RelayPool(
.transform {
when (it) {
is at.torch.compose.network.sockets.NostrIncomingMessage.OkMessage -> emit(it)
is at.torch.compose.network.sockets.NostrIncomingMessage.NoticeMessage -> throw _root_ide_package_.ac.cord.compose.exceptions.NostrNoticeException(
is at.torch.compose.network.sockets.NostrIncomingMessage.NoticeMessage -> throw _root_ide_package_.at.torch.compose.exceptions.NostrNoticeException(
reason = it.message
)
else -> error("$it is not allowed")

View File

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

View File

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

View File

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

View File

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

View File

@@ -40,7 +40,7 @@ class NostrPublisherRepository(
relaysSocketManager.publishEvent(
nostrEvent = signedNostrEvent,
relays = outboxRelays.map {
_root_ide_package_.ac.cord.compose.network.dto.RelayDTO(
_root_ide_package_.at.torch.compose.network.dto.RelayDTO(
url = it,
read = false,
write = true

View File

@@ -241,7 +241,7 @@ fun ChatRoomDetailScreen(
textAlign = TextAlign.Center
)
_root_ide_package_.ac.cord.compose.ui.composable.widgets.LoadingDataIndicator(
_root_ide_package_.at.torch.compose.ui.composable.widgets.LoadingDataIndicator(
fillScreen = false
)
@@ -262,7 +262,7 @@ fun ChatRoomDetailScreen(
@Preview
@Composable
private fun ChatRoomDetailScreenPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {
@@ -271,8 +271,8 @@ private fun ChatRoomDetailScreenPreview() {
publicKey = "publicKey",
relayHint = null,
initialChatRoomDetailUIState = _root_ide_package_.at.torch.compose.ui.view.state.ChatRoomDetailUIState.Loaded(
localChatRoom = _root_ide_package_.ac.cord.compose.database.model.intermdiate.LocalChatRoom(
chatRoom = _root_ide_package_.ac.cord.compose.database.model.ChatRoom(
localChatRoom = _root_ide_package_.at.torch.compose.database.model.intermdiate.LocalChatRoom(
chatRoom = _root_ide_package_.at.torch.compose.database.model.ChatRoom(
id = "",
userPublicKey = "",
subject = "Message title",

View File

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

View File

@@ -105,14 +105,14 @@ fun HomeScreen(
IconButton(
onClick = {
onNavigateToEvent.invoke(
_root_ide_package_.ac.cord.compose.ui.composable.navigation.routes.NostrEventDetailRoute(
_root_ide_package_.at.torch.compose.ui.composable.navigation.routes.NostrEventDetailRoute(
activeUserPublicKey = activeUserPublicKey,
nostrEventId = homeScreenUIState.profileWithFollowing.nostrEvent.id
)
)
}
) {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.profile.ProfileAvatar(
_root_ide_package_.at.torch.compose.ui.composable.widgets.profile.ProfileAvatar(
profile = homeScreenUIState.profileWithFollowing.profile,
publicKey = homeScreenUIState.profileWithFollowing.profile.publicKey
)
@@ -238,7 +238,7 @@ fun HomeScreen(
}
}
_root_ide_package_.at.torch.compose.ui.view.state.HomeScreenUIState.Loading -> {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.LoadingDataIndicator()
_root_ide_package_.at.torch.compose.ui.composable.widgets.LoadingDataIndicator()
}
}
@@ -250,15 +250,15 @@ fun HomeScreen(
@Preview
@Composable
private fun HomeScreenPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {
HomeScreen(
activeUserPublicKey = "",
initialHomeScreenUIState = _root_ide_package_.at.torch.compose.ui.view.state.HomeScreenUIState.Loaded(
profileWithFollowing = _root_ide_package_.ac.cord.compose.database.model.intermdiate.LocalProfileWithFollowing(
nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
profileWithFollowing = _root_ide_package_.at.torch.compose.database.model.intermdiate.LocalProfileWithFollowing(
nostrEvent = _root_ide_package_.at.torch.compose.database.model.NostrEvent(
id = "eventId",
pubKey = "publicKey",
content = """Lorem Ipsum is simply dummy text of the printing and typesetting industry.
@@ -270,7 +270,7 @@ It has survived not only five centuries, but also the leap into electronic types
sig = "",
kind = TextNoteEvent.KIND
),
profile = _root_ide_package_.ac.cord.compose.database.model.Profile(
profile = _root_ide_package_.at.torch.compose.database.model.Profile(
publicKey = "pubKey",
displayName = "John Doe",
nostrEventId = "nostrEventId"

View File

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

View File

@@ -36,7 +36,7 @@ fun LandingScreen(
horizontalAlignment = Alignment.CenterHorizontally
) {
Text(
text = "Aux",
text = "Torch",
style = MaterialTheme.typography.headlineLarge
)
@@ -101,7 +101,7 @@ fun LandingScreen(
@Preview
@Composable
private fun LandingScreenPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {

View File

@@ -18,7 +18,7 @@ fun LoadingScreen(
Column(
modifier = Modifier.padding(innerPadding)
) {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.LoadingDataIndicator(
_root_ide_package_.at.torch.compose.ui.composable.widgets.LoadingDataIndicator(
text = text
)
}
@@ -28,7 +28,7 @@ fun LoadingScreen(
@Preview
@Composable
private fun LoadingScreenPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {

View File

@@ -63,7 +63,7 @@ fun NostrEventDetailScreen(
when(feedListUIState.localNostrEvent.nostrEvent.kind) {
MetadataEvent.KIND -> {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.detail.MetadataEventDetail(
_root_ide_package_.at.torch.compose.ui.composable.widgets.detail.MetadataEventDetail(
activeUserPublicKey = activeUserPublicKey,
localNostrEvent = feedListUIState.localNostrEvent,
onNavigateBack = onNavigateBack,
@@ -74,7 +74,7 @@ fun NostrEventDetailScreen(
)
}
TextNoteEvent.KIND -> {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.detail.TextNoteEventDetail(
_root_ide_package_.at.torch.compose.ui.composable.widgets.detail.TextNoteEventDetail(
feedListUIState.localNostrEvent,
onNavigateBack = onNavigateBack,
onNavigateToWriteAReply = onNavigateToWriteAReply,
@@ -114,7 +114,7 @@ fun NostrEventDetailScreen(
}
}
_root_ide_package_.at.torch.compose.ui.view.state.NostrEventDetailUIState.Loading -> {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.LoadingDataIndicator()
_root_ide_package_.at.torch.compose.ui.composable.widgets.LoadingDataIndicator()
LaunchedEffect(true) {
nostrEventDetailViewModel.loadNostrFeed()
@@ -135,14 +135,14 @@ fun NostrEventDetailScreen(
@Preview
@Composable
private fun NostrEventDetailScreenPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {
NostrEventDetailScreen(
initialNostrEventDetailUIState = _root_ide_package_.at.torch.compose.ui.view.state.NostrEventDetailUIState.Loaded(
localNostrEvent = _root_ide_package_.ac.cord.compose.database.model.intermdiate.LocalNostrEvent(
nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
localNostrEvent = _root_ide_package_.at.torch.compose.database.model.intermdiate.LocalNostrEvent(
nostrEvent = _root_ide_package_.at.torch.compose.database.model.NostrEvent(
id = "eventId",
pubKey = "publicKey",
content = """Lorem Ipsum is simply dummy text of the printing and typesetting industry.
@@ -154,7 +154,7 @@ It has survived not only five centuries, but also the leap into electronic types
sig = "",
kind = TextNoteEvent.KIND
),
profile = _root_ide_package_.ac.cord.compose.database.model.Profile(
profile = _root_ide_package_.at.torch.compose.database.model.Profile(
publicKey = "pubKey",
displayName = "John Doe",
nostrEventId = "nostrEventId"

View File

@@ -258,7 +258,7 @@ fun SearchResultScreen(
localNostrEvent.ListView(
onNavigateToEvent = { nostrEventId ->
onNavigateToEvent.invoke(
_root_ide_package_.ac.cord.compose.ui.composable.navigation.routes.NostrEventDetailRoute(
_root_ide_package_.at.torch.compose.ui.composable.navigation.routes.NostrEventDetailRoute(
activeUserPublicKey = activeUserPublicKey,
nostrEventId = nostrEventId
)
@@ -305,7 +305,7 @@ fun SearchResultScreen(
@Preview
@Composable
private fun SearchResultScreenPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {

View File

@@ -154,7 +154,7 @@ fun SearchScreen(
IconButton(
onClick = {
onNavigateToSearchResult.invoke(
_root_ide_package_.ac.cord.compose.ui.composable.navigation.routes.SearchResultRoute(
_root_ide_package_.at.torch.compose.ui.composable.navigation.routes.SearchResultRoute(
activeUserPublicKey = activeUserPublicKey,
textFieldState.text.toString()
)
@@ -170,7 +170,7 @@ fun SearchScreen(
modifier = Modifier
.clickable {
onNavigateToSearchResult.invoke(
_root_ide_package_.ac.cord.compose.ui.composable.navigation.routes.SearchResultRoute(
_root_ide_package_.at.torch.compose.ui.composable.navigation.routes.SearchResultRoute(
activeUserPublicKey = activeUserPublicKey,
textFieldState.text.toString()
)
@@ -193,7 +193,7 @@ fun SearchScreen(
IconButton(
onClick = {
onNavigateToSearchResult.invoke(
_root_ide_package_.ac.cord.compose.ui.composable.navigation.routes.SearchResultRoute(
_root_ide_package_.at.torch.compose.ui.composable.navigation.routes.SearchResultRoute(
activeUserPublicKey = activeUserPublicKey,
query = "#${
textFieldState.text.toString()
@@ -212,7 +212,7 @@ fun SearchScreen(
modifier = Modifier
.clickable {
onNavigateToSearchResult.invoke(
_root_ide_package_.ac.cord.compose.ui.composable.navigation.routes.SearchResultRoute(
_root_ide_package_.at.torch.compose.ui.composable.navigation.routes.SearchResultRoute(
activeUserPublicKey = activeUserPublicKey,
"#${
textFieldState.text.toString()
@@ -243,7 +243,7 @@ fun SearchScreen(
)
},
leadingContent = {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.profile.ProfileAvatar(
_root_ide_package_.at.torch.compose.ui.composable.widgets.profile.ProfileAvatar(
profile = profile,
publicKey = profile.publicKey
)
@@ -251,7 +251,7 @@ fun SearchScreen(
modifier = Modifier
.clickable {
onNavigateToProfile.invoke(
_root_ide_package_.ac.cord.compose.ui.composable.navigation.routes.NostrEventDetailRoute(
_root_ide_package_.at.torch.compose.ui.composable.navigation.routes.NostrEventDetailRoute(
activeUserPublicKey = activeUserPublicKey,
profile.nostrEventId
)
@@ -294,14 +294,14 @@ fun SearchScreen(
.size(IconButtonDefaults.mediumContainerSize()),
onClick = {
onNavigateToProfile.invoke(
_root_ide_package_.ac.cord.compose.ui.composable.navigation.routes.NostrEventDetailRoute(
_root_ide_package_.at.torch.compose.ui.composable.navigation.routes.NostrEventDetailRoute(
activeUserPublicKey = activeUserPublicKey,
profile.nostrEventId
)
)
}
) {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.profile.ProfileAvatar(
_root_ide_package_.at.torch.compose.ui.composable.widgets.profile.ProfileAvatar(
size = 70.dp,
profile = profile,
publicKey = profile.publicKey
@@ -356,7 +356,7 @@ fun SearchScreen(
modifier = Modifier
.clickable {
onNavigateToSearchResult.invoke(
_root_ide_package_.ac.cord.compose.ui.composable.navigation.routes.SearchResultRoute(
_root_ide_package_.at.torch.compose.ui.composable.navigation.routes.SearchResultRoute(
activeUserPublicKey = activeUserPublicKey,
query = recentSearch.query
)
@@ -404,7 +404,7 @@ fun SearchScreen(
@Preview
@Composable
private fun SearchScreenPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {

View File

@@ -254,7 +254,7 @@ fun SignInToProfileScreen(
@Preview
@Composable
private fun SignInToProfileScreenPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {

View File

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

View File

@@ -56,7 +56,7 @@ fun SovereignWalletStartupScreen(
) {
when (sovereignWalletViewModel.listWalletState.value) {
is ListWalletState.Init -> {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.LoadingDataIndicator(
_root_ide_package_.at.torch.compose.ui.composable.widgets.LoadingDataIndicator(
text = "Decrypting..."
)
}
@@ -84,17 +84,17 @@ fun SovereignWalletStartupScreen(
when {
availableWallets.isEmpty() -> {
LaunchedEffect(Unit) { onNavigateToWalletLandingPage.invoke() }
_root_ide_package_.ac.cord.compose.ui.composable.widgets.LoadingDataIndicator(
_root_ide_package_.at.torch.compose.ui.composable.widgets.LoadingDataIndicator(
text = "Initializing..."
)
}
availableWalletMetadata == null || defaultWallet.value == null -> {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.LoadingDataIndicator(
_root_ide_package_.at.torch.compose.ui.composable.widgets.LoadingDataIndicator(
text = "Preparing wallet..."
)
}
activeWallet != null -> {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.LoadingDataIndicator(
_root_ide_package_.at.torch.compose.ui.composable.widgets.LoadingDataIndicator(
text = "Opening Wallet"
)
LaunchedEffect(Unit) {
@@ -119,7 +119,7 @@ fun SovereignWalletStartupScreen(
}
when (val wallet = loadingWallet) {
null -> {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.wallet.WalletsSelector(
_root_ide_package_.at.torch.compose.ui.composable.widgets.wallet.WalletsSelector(
wallets = availableWallets,
globalPrefs = globalPrefs,
walletsMetadata = availableWalletMetadata,
@@ -171,12 +171,12 @@ fun SovereignWalletStartupScreen(
}
}
is at.torch.compose.ui.view.model.StartupViewState.StartingBusiness -> {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.LoadingDataIndicator(
_root_ide_package_.at.torch.compose.ui.composable.widgets.LoadingDataIndicator(
text = "Starting wallet"
)
}
is at.torch.compose.ui.view.model.StartupViewState.BusinessActive -> {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.LoadingDataIndicator(
_root_ide_package_.at.torch.compose.ui.composable.widgets.LoadingDataIndicator(
text = "Opening wallet"
)
}
@@ -238,10 +238,10 @@ private fun BoxScope.LoadWallet(
when (isScreenLockRequired.value) {
null -> {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.LoadingDataIndicator(text = "Loading preferences...")
_root_ide_package_.at.torch.compose.ui.composable.widgets.LoadingDataIndicator(text = "Loading preferences...")
}
true -> {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.LoadingDataIndicator(text = "Unlock to continue")
_root_ide_package_.at.torch.compose.ui.composable.widgets.LoadingDataIndicator(text = "Unlock to continue")
ScreenLockPrompt(
walletId = userWallet.walletId,
walletName = metadata.nameOrDefault(),
@@ -253,7 +253,7 @@ private fun BoxScope.LoadWallet(
)
}
false -> {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.LoadingDataIndicator(text = "Starting wallet...")
_root_ide_package_.at.torch.compose.ui.composable.widgets.LoadingDataIndicator(text = "Starting wallet...")
LaunchedEffect(Unit) {
doLoadWallet(userWallet)
}

View File

@@ -53,7 +53,7 @@ fun UnannouncedProfileScreen() {
Spacer(
modifier = Modifier.weight(1f)
)
_root_ide_package_.ac.cord.compose.ui.composable.widgets.LoadingDataIndicator(
_root_ide_package_.at.torch.compose.ui.composable.widgets.LoadingDataIndicator(
fillScreen = false
)
@@ -71,7 +71,7 @@ fun UnannouncedProfileScreen() {
@Preview
@Composable
private fun UnannouncedProfileScreenPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {

View File

@@ -53,7 +53,7 @@ fun UnindexedProfileScreen() {
Spacer(
modifier = Modifier.weight(1f)
)
_root_ide_package_.ac.cord.compose.ui.composable.widgets.LoadingDataIndicator(
_root_ide_package_.at.torch.compose.ui.composable.widgets.LoadingDataIndicator(
fillScreen = false
)
@@ -71,7 +71,7 @@ fun UnindexedProfileScreen() {
@Preview
@Composable
private fun UnannouncedProfileScreenPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {

View File

@@ -53,7 +53,7 @@ fun UnqueuedProfileScreen() {
Spacer(
modifier = Modifier.weight(1f)
)
_root_ide_package_.ac.cord.compose.ui.composable.widgets.LoadingDataIndicator(
_root_ide_package_.at.torch.compose.ui.composable.widgets.LoadingDataIndicator(
fillScreen = false
)
@@ -71,7 +71,7 @@ fun UnqueuedProfileScreen() {
@Preview
@Composable
private fun UnannouncedProfileScreenPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {

View File

@@ -64,7 +64,7 @@ fun UnqueuedProfileSynchronizationScreen(
textAlign = TextAlign.Center
)
_root_ide_package_.ac.cord.compose.ui.composable.widgets.LoadingDataIndicator(
_root_ide_package_.at.torch.compose.ui.composable.widgets.LoadingDataIndicator(
fillScreen = false
)
@@ -83,7 +83,7 @@ fun UnqueuedProfileSynchronizationScreen(
@Preview
@Composable
private fun UnqueuedProfileSynchronizationScreenPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {

View File

@@ -50,7 +50,7 @@ fun UnsignedProfileScreen() {
textAlign = TextAlign.Center
)
_root_ide_package_.ac.cord.compose.ui.composable.widgets.LoadingDataIndicator(
_root_ide_package_.at.torch.compose.ui.composable.widgets.LoadingDataIndicator(
fillScreen = false
)
@@ -65,7 +65,7 @@ fun UnsignedProfileScreen() {
@Preview
@Composable
private fun UnsignedProfileScreenPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {

View File

@@ -52,7 +52,7 @@ fun UnsyncedProfileScreen(
textAlign = TextAlign.Center
)
_root_ide_package_.ac.cord.compose.ui.composable.widgets.LoadingDataIndicator(
_root_ide_package_.at.torch.compose.ui.composable.widgets.LoadingDataIndicator(
fillScreen = false
)
@@ -67,7 +67,7 @@ fun UnsyncedProfileScreen(
@Preview
@Composable
private fun UnsyncedProfileScreenPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {

View File

@@ -88,7 +88,7 @@ fun WriteNewNoteScreen(
when (val writeNewNoteUIState = writeNewNoteViewModel.writeNewNoteUIState) {
is at.torch.compose.ui.view.state.WriteNewNoteUIState.Loading -> {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.LoadingDataIndicator()
_root_ide_package_.at.torch.compose.ui.composable.widgets.LoadingDataIndicator()
}
is at.torch.compose.ui.view.state.WriteNewNoteUIState.InputPrompt -> {
@@ -167,7 +167,7 @@ fun WriteNewNoteScreen(
)
},
leadingIcon = {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.profile.ProfileAvatar(
_root_ide_package_.at.torch.compose.ui.composable.widgets.profile.ProfileAvatar(
profile = writeNewNoteUIState.localProfile.profile,
size = 35.dp
)
@@ -228,7 +228,7 @@ fun WriteNewNoteScreen(
)
},
leadingIcon = {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.profile.ProfileAvatar(
_root_ide_package_.at.torch.compose.ui.composable.widgets.profile.ProfileAvatar(
profile = profile
)
},
@@ -331,7 +331,7 @@ fun WriteNewNoteScreen(
)
}
_root_ide_package_.ac.cord.compose.ui.composable.widgets.profile.ProfileAvatar(
_root_ide_package_.at.torch.compose.ui.composable.widgets.profile.ProfileAvatar(
profile = writeNewNoteUIState.localProfile.profile
)
@@ -343,9 +343,9 @@ fun WriteNewNoteScreen(
)
}
_root_ide_package_.ac.cord.compose.ui.composable.widgets.content.RichContent(
_root_ide_package_.at.torch.compose.ui.composable.widgets.content.RichContent(
// Hack to have the thing rendered for a preview...
nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
nostrEvent = _root_ide_package_.at.torch.compose.database.model.NostrEvent(
id = "",
content = writeNewNoteUIState.text,
sig = "",
@@ -356,8 +356,8 @@ fun WriteNewNoteScreen(
),
localQuotedNostrEvent = null,
mentionedProfiles = writeNewNoteViewModel.mentionableProfiles.map {
_root_ide_package_.ac.cord.compose.database.model.intermdiate.LocalMention(
mention = _root_ide_package_.ac.cord.compose.database.model.Mention(
_root_ide_package_.at.torch.compose.database.model.intermdiate.LocalMention(
mention = _root_ide_package_.at.torch.compose.database.model.Mention(
mentionedPublicKey = it.publicKey,
mentioningNostrEventId = ""
),
@@ -452,7 +452,7 @@ fun WriteNewNoteScreen(
@Preview
@Composable
private fun WriteNewNoteScreenPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.fillMaxSize()
) {
@@ -463,8 +463,8 @@ private fun WriteNewNoteScreenPreview() {
initialWriteNewNoteUIState =
_root_ide_package_.at.torch.compose.ui.view.state.WriteNewNoteUIState.InputPrompt(
// text = "Yes, I did it. So WHAT?!",
inReplyToNostrEvent = _root_ide_package_.ac.cord.compose.database.model.intermdiate.LocalNostrEvent(
nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
inReplyToNostrEvent = _root_ide_package_.at.torch.compose.database.model.intermdiate.LocalNostrEvent(
nostrEvent = _root_ide_package_.at.torch.compose.database.model.NostrEvent(
id = "eventId",
pubKey = "publicKey",
content = """Lorem Ipsum is simply dummy text of the printing and typesetting industry.
@@ -476,14 +476,14 @@ It has survived not only five centuries, but also the leap into electronic types
sig = "",
kind = TextNoteEvent.KIND
),
profile = _root_ide_package_.ac.cord.compose.database.model.Profile(
profile = _root_ide_package_.at.torch.compose.database.model.Profile(
publicKey = "pubKey",
displayName = "John Doe",
nostrEventId = "nostrEventId"
),
),
localProfile = _root_ide_package_.ac.cord.compose.database.model.intermdiate.LocalProfileWithFollowing(
nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
localProfile = _root_ide_package_.at.torch.compose.database.model.intermdiate.LocalProfileWithFollowing(
nostrEvent = _root_ide_package_.at.torch.compose.database.model.NostrEvent(
id = "eventId",
pubKey = "publicKey",
content = """Lorem Ipsum is simply dummy text of the printing and typesetting industry.
@@ -495,7 +495,7 @@ It has survived not only five centuries, but also the leap into electronic types
sig = "",
kind = TextNoteEvent.KIND
),
profile = _root_ide_package_.ac.cord.compose.database.model.Profile(
profile = _root_ide_package_.at.torch.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_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(modifier = Modifier.fillMaxSize()) {
LoadingDataIndicator(
text = "Starting up"

View File

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

View File

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

View File

@@ -118,14 +118,14 @@ fun QuotedNote(
@Preview
@Composable
private fun QuotedNotePreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {
QuotedNote(
localQuotedNostrEvent = _root_ide_package_.ac.cord.compose.database.model.intermdiate.LocalQuotedNostrEvent(
nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
localQuotedNostrEvent = _root_ide_package_.at.torch.compose.database.model.intermdiate.LocalQuotedNostrEvent(
nostrEvent = _root_ide_package_.at.torch.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",
@@ -133,12 +133,12 @@ private fun QuotedNotePreview() {
sig = "hexsig",
tags = emptyArray()
),
quotedRelation = _root_ide_package_.ac.cord.compose.database.model.QuotedRelation(
quotedRelation = _root_ide_package_.at.torch.compose.database.model.QuotedRelation(
quotingNostrEventId = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a520",
quotedProfilePublicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
quotedNostrEventId = "1c7213118d4e17c6bad5c6b11125f005619bc3e43374affb9cd6483f665fd5e6"
),
profile = _root_ide_package_.ac.cord.compose.database.model.Profile(
profile = _root_ide_package_.at.torch.compose.database.model.Profile(
publicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
nostrEventId = "referenced",
displayName = "Steve Biko"

View File

@@ -403,7 +403,7 @@ fun RichContent(
@Preview
@Composable
private fun RichContentPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {
@@ -412,7 +412,7 @@ private fun RichContentPreview() {
) {
RichContent(
modifier = Modifier.padding(10.dp),
nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
nostrEvent = _root_ide_package_.at.torch.compose.database.model.NostrEvent(
id = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a520",
content = "Something something something nostr:npub1uh366qnj68a7atvwgwdy4569xd6v5jtferftapqztwjwlzh9553q47pqsx\nhttps://www.brainyquote.com/authors/steven-biko-quotes\nnostr:nevent1qqspcusnzxx5u97xht2udvg3yhcq2cvmc0jrxa90lwwdvjplve0atespzpmhxue69uhkummnw3ezuamfdejsyg8h5g639qhuv803hzwexfwhyud6t6suxfu364anddqvrmn9j4cahvxksr8q",
pubKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
@@ -420,8 +420,8 @@ private fun RichContentPreview() {
sig = "hexsig",
tags = emptyArray()
),
localQuotedNostrEvent = _root_ide_package_.ac.cord.compose.database.model.intermdiate.LocalQuotedNostrEvent(
nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
localQuotedNostrEvent = _root_ide_package_.at.torch.compose.database.model.intermdiate.LocalQuotedNostrEvent(
nostrEvent = _root_ide_package_.at.torch.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",
@@ -429,24 +429,24 @@ private fun RichContentPreview() {
sig = "hexsig",
tags = emptyArray()
),
quotedRelation = _root_ide_package_.ac.cord.compose.database.model.QuotedRelation(
quotedRelation = _root_ide_package_.at.torch.compose.database.model.QuotedRelation(
quotingNostrEventId = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a520",
quotedProfilePublicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
quotedNostrEventId = "1c7213118d4e17c6bad5c6b11125f005619bc3e43374affb9cd6483f665fd5e6"
),
profile = _root_ide_package_.ac.cord.compose.database.model.Profile(
profile = _root_ide_package_.at.torch.compose.database.model.Profile(
publicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
nostrEventId = "referenced",
displayName = "Steve Biko"
),
),
mentionedProfiles = listOf(
_root_ide_package_.ac.cord.compose.database.model.intermdiate.LocalMention(
mention = _root_ide_package_.ac.cord.compose.database.model.Mention(
_root_ide_package_.at.torch.compose.database.model.intermdiate.LocalMention(
mention = _root_ide_package_.at.torch.compose.database.model.Mention(
id = 1,
mentionedPublicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
),
profile = _root_ide_package_.ac.cord.compose.database.model.Profile(
profile = _root_ide_package_.at.torch.compose.database.model.Profile(
publicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
nostrEventId = "referenced",
displayName = "Frank Talk"

View File

@@ -143,7 +143,7 @@ fun MetadataEventDetail(
horizontalArrangement = Arrangement.spacedBy(10.dp),
verticalAlignment = Alignment.CenterVertically
) {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.profile.ProfileAvatar(
_root_ide_package_.at.torch.compose.ui.composable.widgets.profile.ProfileAvatar(
size = 75.dp,
profile = profile,
publicKey = localNostrEvent.nostrEvent.pubKey
@@ -216,7 +216,7 @@ fun MetadataEventDetail(
IconButton(
onClick = {
onNavigateToChatRoom.invoke(
_root_ide_package_.ac.cord.compose.ui.composable.navigation.routes.ChatRoomDetailRoute(
_root_ide_package_.at.torch.compose.ui.composable.navigation.routes.ChatRoomDetailRoute(
activeUserPublicKey = activeUserPublicKey,
directMessageIdentifier = localNostrEvent.nostrEvent.pubKey,
relayHint = localNostrEvent.nostrEvent.relayUrl,
@@ -369,14 +369,14 @@ fun MetadataEventDetail(
@Composable
private fun MetadataEventEventDetailPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {
MetadataEventDetail(
activeUserPublicKey = "",
localNostrEvent = _root_ide_package_.ac.cord.compose.database.model.intermdiate.LocalNostrEvent(
nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
localNostrEvent = _root_ide_package_.at.torch.compose.database.model.intermdiate.LocalNostrEvent(
nostrEvent = _root_ide_package_.at.torch.compose.database.model.NostrEvent(
id = "eventId",
pubKey = "publicKey",
content = """Profile""".trimIndent(),
@@ -384,7 +384,7 @@ private fun MetadataEventEventDetailPreview() {
sig = "",
kind = MetadataEvent.KIND
),
profile = _root_ide_package_.ac.cord.compose.database.model.Profile(
profile = _root_ide_package_.at.torch.compose.database.model.Profile(
publicKey = "pubKey",
displayName = "John Doe",
nip05 = "john@doe.com",

View File

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

View File

@@ -128,12 +128,12 @@ fun at.torch.compose.database.model.intermdiate.LocalNostrEvent.ListView(
@Preview
@Composable
private fun EventListViewRepostedPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {
_root_ide_package_.ac.cord.compose.database.model.intermdiate.LocalNostrEvent(
nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
_root_ide_package_.at.torch.compose.database.model.intermdiate.LocalNostrEvent(
nostrEvent = _root_ide_package_.at.torch.compose.database.model.NostrEvent(
id = "hex",
content = "Reposting",
pubKey = "hexpubkeypubkeypubkeypubkey",
@@ -141,13 +141,13 @@ private fun EventListViewRepostedPreview() {
sig = "hexsig",
tags = emptyArray()
),
localRepostedNostrEvent = _root_ide_package_.ac.cord.compose.database.model.intermdiate.LocalRepostedNostrEvent(
repostedRelation = _root_ide_package_.ac.cord.compose.database.model.RepostedRelation(
localRepostedNostrEvent = _root_ide_package_.at.torch.compose.database.model.intermdiate.LocalRepostedNostrEvent(
repostedRelation = _root_ide_package_.at.torch.compose.database.model.RepostedRelation(
repostingNostrEventId = "hex",
repostedNostrEventId = "repostedhex",
repostedProfilePublicKey = "reposterHex"
),
nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
nostrEvent = _root_ide_package_.at.torch.compose.database.model.NostrEvent(
id = "hex",
content = "Something something something",
pubKey = "hexpubkeypubkeypubkeypubkey",
@@ -155,7 +155,7 @@ private fun EventListViewRepostedPreview() {
sig = "hexsig",
tags = emptyArray()
),
profile = _root_ide_package_.ac.cord.compose.database.model.Profile(
profile = _root_ide_package_.at.torch.compose.database.model.Profile(
publicKey = "hesd",
nostrEventId = "referenced",
displayName = "Frank Talk",
@@ -163,7 +163,7 @@ private fun EventListViewRepostedPreview() {
),
mentionedProfiles = emptyList()
),
profile = _root_ide_package_.ac.cord.compose.database.model.Profile(
profile = _root_ide_package_.at.torch.compose.database.model.Profile(
publicKey = "",
nostrEventId = "referenced",
displayName = "Steve Biko",
@@ -179,12 +179,12 @@ private fun EventListViewRepostedPreview() {
@Preview
@Composable
private fun EventListViewInReplyPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {
_root_ide_package_.ac.cord.compose.database.model.intermdiate.LocalNostrEvent(
nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
_root_ide_package_.at.torch.compose.database.model.intermdiate.LocalNostrEvent(
nostrEvent = _root_ide_package_.at.torch.compose.database.model.NostrEvent(
id = "hex",
content = "Reposting",
pubKey = "hexpubkeypubkeypubkeypubkey",
@@ -192,15 +192,15 @@ private fun EventListViewInReplyPreview() {
sig = "hexsig",
tags = emptyArray()
),
localInReplyToNostrEvent = _root_ide_package_.ac.cord.compose.database.model.intermdiate.LocalInReplyToNostrEvent(
inReplyToRelation = _root_ide_package_.ac.cord.compose.database.model.InReplyToRelation(
localInReplyToNostrEvent = _root_ide_package_.at.torch.compose.database.model.intermdiate.LocalInReplyToNostrEvent(
inReplyToRelation = _root_ide_package_.at.torch.compose.database.model.InReplyToRelation(
inReplyToNostrEventId = "nostrEvent",
inReplyToRootNostrEventId = "rootId",
inReplyToProfilePublicKey = "inReplyToProfileKey",
inReplyToRootProfilePublicKey = "rootPubKey",
replyingNostrEventId = "hex"
),
nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
nostrEvent = _root_ide_package_.at.torch.compose.database.model.NostrEvent(
id = "hex",
content = "Something something something",
pubKey = "hexpubkeypubkeypubkeypubkey",
@@ -208,7 +208,7 @@ private fun EventListViewInReplyPreview() {
sig = "hexsig",
tags = emptyArray()
),
profile = _root_ide_package_.ac.cord.compose.database.model.Profile(
profile = _root_ide_package_.at.torch.compose.database.model.Profile(
publicKey = "hesd",
nostrEventId = "referenced",
displayName = "Frank Talk",
@@ -216,7 +216,7 @@ private fun EventListViewInReplyPreview() {
),
mentionedProfiles = emptyList()
),
profile = _root_ide_package_.ac.cord.compose.database.model.Profile(
profile = _root_ide_package_.at.torch.compose.database.model.Profile(
publicKey = "",
nostrEventId = "referenced",
displayName = "Steve Biko",

View File

@@ -98,7 +98,7 @@ internal fun TextNoteFeedItem(
horizontalArrangement = Arrangement.spacedBy(10.dp, Alignment.Start),
verticalAlignment = Alignment.CenterVertically
) {
_root_ide_package_.ac.cord.compose.ui.composable.widgets.profile.ProfileAvatar(
_root_ide_package_.at.torch.compose.ui.composable.widgets.profile.ProfileAvatar(
publicKey = nostrEvent.pubKey,
profile = profile
)
@@ -126,7 +126,7 @@ internal fun TextNoteFeedItem(
)
}
_root_ide_package_.ac.cord.compose.ui.composable.widgets.content.RichContent(
_root_ide_package_.at.torch.compose.ui.composable.widgets.content.RichContent(
modifier = Modifier.fillMaxWidth(),
nostrEvent = nostrEvent,
localQuotedNostrEvent = localQuotedNostrEvent,
@@ -189,12 +189,12 @@ internal fun TextNoteFeedItem(
@Preview
@Composable
private fun TextNoteFeedItemPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {
TextNoteFeedItem(
nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
nostrEvent = _root_ide_package_.at.torch.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",
@@ -202,7 +202,7 @@ private fun TextNoteFeedItemPreview() {
sig = "hexsig",
tags = emptyArray()
),
profile = _root_ide_package_.ac.cord.compose.database.model.Profile(
profile = _root_ide_package_.at.torch.compose.database.model.Profile(
publicKey = "",
nostrEventId = "referenced",
displayName = "Frank Talk",
@@ -220,12 +220,12 @@ private fun TextNoteFeedItemPreview() {
@Preview
@Composable
private fun TextNoteFeedItemInReplyToPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {
TextNoteFeedItem(
nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
nostrEvent = _root_ide_package_.at.torch.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",
@@ -233,22 +233,22 @@ private fun TextNoteFeedItemInReplyToPreview() {
sig = "hexsig",
tags = emptyArray()
),
profile = _root_ide_package_.ac.cord.compose.database.model.Profile(
profile = _root_ide_package_.at.torch.compose.database.model.Profile(
publicKey = "",
nostrEventId = "referenced",
displayName = "Frank Talk",
nip05 = "frank@talk.at"
),
localQuotedNostrEvent = null,
localInReplyToNostrEvent = _root_ide_package_.ac.cord.compose.database.model.intermdiate.LocalInReplyToNostrEvent(
inReplyToRelation = _root_ide_package_.ac.cord.compose.database.model.InReplyToRelation(
localInReplyToNostrEvent = _root_ide_package_.at.torch.compose.database.model.intermdiate.LocalInReplyToNostrEvent(
inReplyToRelation = _root_ide_package_.at.torch.compose.database.model.InReplyToRelation(
inReplyToNostrEventId = "nostrEvent",
inReplyToRootNostrEventId = "rootId",
inReplyToProfilePublicKey = "inReplyToProfileKey",
inReplyToRootProfilePublicKey = "rootPubKey",
replyingNostrEventId = "hex"
),
nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
nostrEvent = _root_ide_package_.at.torch.compose.database.model.NostrEvent(
id = "hex",
content = "Something something something",
pubKey = "hexie",
@@ -256,7 +256,7 @@ private fun TextNoteFeedItemInReplyToPreview() {
sig = "hexsig",
tags = emptyArray()
),
profile = _root_ide_package_.ac.cord.compose.database.model.Profile(
profile = _root_ide_package_.at.torch.compose.database.model.Profile(
publicKey = "hesd",
nostrEventId = "referenced",
displayName = "Steve Biko",
@@ -274,12 +274,12 @@ private fun TextNoteFeedItemInReplyToPreview() {
@Preview
@Composable
private fun TextNoteFeedItemQuoteNostrEventPreview() {
_root_ide_package_.ac.cord.compose.ui.theme.AuxTheme {
_root_ide_package_.at.torch.compose.ui.theme.TorchTheme {
Surface(
modifier = Modifier.padding(20.dp)
) {
TextNoteFeedItem(
nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
nostrEvent = _root_ide_package_.at.torch.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",
@@ -288,14 +288,14 @@ private fun TextNoteFeedItemQuoteNostrEventPreview() {
sig = "hexsig",
tags = emptyArray()
),
profile = _root_ide_package_.ac.cord.compose.database.model.Profile(
profile = _root_ide_package_.at.torch.compose.database.model.Profile(
publicKey = "",
nostrEventId = "referenced",
displayName = "Frank Talk",
nip05 = "frank@talk.at"
),
localQuotedNostrEvent = _root_ide_package_.ac.cord.compose.database.model.intermdiate.LocalQuotedNostrEvent(
nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
localQuotedNostrEvent = _root_ide_package_.at.torch.compose.database.model.intermdiate.LocalQuotedNostrEvent(
nostrEvent = _root_ide_package_.at.torch.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",
@@ -303,26 +303,26 @@ private fun TextNoteFeedItemQuoteNostrEventPreview() {
sig = "hexsig",
tags = emptyArray()
),
quotedRelation = _root_ide_package_.ac.cord.compose.database.model.QuotedRelation(
quotedRelation = _root_ide_package_.at.torch.compose.database.model.QuotedRelation(
quotingNostrEventId = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a520",
quotedProfilePublicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
quotedNostrEventId = "1c7213118d4e17c6bad5c6b11125f005619bc3e43374affb9cd6483f665fd5e6"
),
profile = _root_ide_package_.ac.cord.compose.database.model.Profile(
profile = _root_ide_package_.at.torch.compose.database.model.Profile(
publicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
nostrEventId = "referenced",
displayName = "Steve Biko"
),
),
localInReplyToNostrEvent = _root_ide_package_.ac.cord.compose.database.model.intermdiate.LocalInReplyToNostrEvent(
inReplyToRelation = _root_ide_package_.ac.cord.compose.database.model.InReplyToRelation(
localInReplyToNostrEvent = _root_ide_package_.at.torch.compose.database.model.intermdiate.LocalInReplyToNostrEvent(
inReplyToRelation = _root_ide_package_.at.torch.compose.database.model.InReplyToRelation(
inReplyToNostrEventId = "nostrEvent",
inReplyToRootNostrEventId = "rootId",
inReplyToProfilePublicKey = "inReplyToProfileKey",
inReplyToRootProfilePublicKey = "rootPubKey",
replyingNostrEventId = "hex"
),
nostrEvent = _root_ide_package_.ac.cord.compose.database.model.NostrEvent(
nostrEvent = _root_ide_package_.at.torch.compose.database.model.NostrEvent(
id = "hex",
content = "Something something something",
pubKey = "hexie",
@@ -330,7 +330,7 @@ private fun TextNoteFeedItemQuoteNostrEventPreview() {
sig = "hexsig",
tags = emptyArray()
),
profile = _root_ide_package_.ac.cord.compose.database.model.Profile(
profile = _root_ide_package_.at.torch.compose.database.model.Profile(
publicKey = "hesd",
nostrEventId = "referenced",
displayName = "Steve Biko",
@@ -339,12 +339,12 @@ private fun TextNoteFeedItemQuoteNostrEventPreview() {
mentionedProfiles = emptyList()
),
mentionedProfiles = listOf(
_root_ide_package_.ac.cord.compose.database.model.intermdiate.LocalMention(
mention = _root_ide_package_.ac.cord.compose.database.model.Mention(
_root_ide_package_.at.torch.compose.database.model.intermdiate.LocalMention(
mention = _root_ide_package_.at.torch.compose.database.model.Mention(
mentioningNostrEventId = "000067b3f15cac88ba066b28c370083a4fc80dacc054e554ab1dc0def974c89c",
mentionedPublicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522"
),
profile = _root_ide_package_.ac.cord.compose.database.model.Profile(
profile = _root_ide_package_.at.torch.compose.database.model.Profile(
publicKey = "e5e3ad0272d1fbeead8e439a4ad3453374ca4969c8d2be84025ba4ef8ae5a522",
nostrEventId = "referenced",
displayName = "Steve Biko",

View File

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

View File

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

View File

@@ -98,7 +98,7 @@ class ChatRoomDetailMessageListViewModel(
// Sync messages from this relay...
Pair(
chatMessageRelayListEvent.relays(),
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
kinds = arrayOf(
GiftWrapEvent.KIND,
),
@@ -115,7 +115,7 @@ class ChatRoomDetailMessageListViewModel(
// TODO: compute the timestamp for when list we sent messages and use that as since...
Pair(
_root_ide_package_.at.torch.compose.nostr.Relays.negentropicRelaySet,
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
kinds = arrayOf(
ChatMessageRelayListEvent.KIND,
),
@@ -130,7 +130,7 @@ class ChatRoomDetailMessageListViewModel(
logger.i("GiftWrapFilter: ${relayAndSynchronizationFilter.second}")
val negentropySynchronizeRequests = relayAndSynchronizationFilter.first.map { normalizedRelayUrl ->
_root_ide_package_.ac.cord.compose.database.model.NegentropySynchronizeRequest(
_root_ide_package_.at.torch.compose.database.model.NegentropySynchronizeRequest(
id = _root_ide_package_.at.torch.compose.database.model.NegentropySynchronizeRequest.Companion.computeId(
relayURL = normalizedRelayUrl.url,
synchronizationFilter = relayAndSynchronizationFilter.second

View File

@@ -69,7 +69,7 @@ class ChatRoomListViewModel(
// Sync Notifications... might want to also run this in the background
nostrRepository.queueNegentropySynchronizeRequest(
_root_ide_package_.at.torch.compose.nostr.Relays.DefaultDMRelayList.shuffled().map { normalizedRelayUrl ->
_root_ide_package_.ac.cord.compose.database.model.NegentropySynchronizeRequest(
_root_ide_package_.at.torch.compose.database.model.NegentropySynchronizeRequest(
id = _root_ide_package_.at.torch.compose.database.model.NegentropySynchronizeRequest.Companion.computeId(
relayURL = normalizedRelayUrl.url,
synchronizationFilter = synchronizationFilter
@@ -131,7 +131,7 @@ class ChatRoomListViewModel(
modifier = Modifier.fillMaxWidth(),
onClick = {
onNavigateToDirectMessageDetail.invoke(
_root_ide_package_.ac.cord.compose.ui.composable.navigation.routes.ChatRoomDetailRoute(
_root_ide_package_.at.torch.compose.ui.composable.navigation.routes.ChatRoomDetailRoute(
activeUserPublicKey = publicKey,
directMessageIdentifier = localChatRoom.chatRoom.id,
relayHint = localChatRoom.localParticipants.firstOrNull { it.participant.participantPublicKey != localChatRoom.chatRoom.userPublicKey }?.participant?.relayHint

View File

@@ -46,7 +46,7 @@ class FeedListViewModel(
val isSynchronizationPending: MutableState<Boolean> = mutableStateOf(false)
val negentropySynchronizeRequests = _root_ide_package_.at.torch.compose.nostr.Relays.negentropicRelaySet.shuffled().map { normalizedRelayUrl ->
_root_ide_package_.ac.cord.compose.database.model.NegentropySynchronizeRequest(
_root_ide_package_.at.torch.compose.database.model.NegentropySynchronizeRequest(
id = _root_ide_package_.at.torch.compose.database.model.NegentropySynchronizeRequest.Companion.computeId(
normalizedRelayUrl.url,
synchronizationFilter = synchronizationFilter
@@ -149,7 +149,7 @@ class FeedListViewModel(
localNostrEvent.ListView(
onNavigateToEvent = { nostrEventId ->
onNavigateToEvent.invoke(
_root_ide_package_.ac.cord.compose.ui.composable.navigation.routes.NostrEventDetailRoute(
_root_ide_package_.at.torch.compose.ui.composable.navigation.routes.NostrEventDetailRoute(
activeUserPublicKey = activeUserPublicKey,
nostrEventId = nostrEventId
)

View File

@@ -69,7 +69,7 @@ class FollowersListViewModel(
// Sync Notifications... might want to also run this in the background
nostrRepository.queueNegentropySynchronizeRequest(
_root_ide_package_.at.torch.compose.nostr.Relays.negentropicRelaySet.shuffled().map { normalizedRelayUrl ->
_root_ide_package_.ac.cord.compose.database.model.NegentropySynchronizeRequest(
_root_ide_package_.at.torch.compose.database.model.NegentropySynchronizeRequest(
id = _root_ide_package_.at.torch.compose.database.model.NegentropySynchronizeRequest.Companion.computeId(
relayURL = normalizedRelayUrl.url,
synchronizationFilter = synchronizationFilter

View File

@@ -68,7 +68,7 @@ class FollowingListViewModel(
// Sync Notifications... might want to also run this in the background
nostrRepository.queueNegentropySynchronizeRequest(
_root_ide_package_.at.torch.compose.nostr.Relays.negentropicRelaySet.shuffled().map { normalizedRelayUrl ->
_root_ide_package_.ac.cord.compose.database.model.NegentropySynchronizeRequest(
_root_ide_package_.at.torch.compose.database.model.NegentropySynchronizeRequest(
id = _root_ide_package_.at.torch.compose.database.model.NegentropySynchronizeRequest.Companion.computeId(
relayURL = normalizedRelayUrl.url,
synchronizationFilter = synchronizationFilter

View File

@@ -76,7 +76,7 @@ class HomeViewModel(
return when (homeScreenType) {
HomeScreenType.Following -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
authors = profileWithFollowing.following.map { it.publicKey }.toTypedArray(),
kinds = arrayOf(
TextNoteEvent.KIND,
@@ -88,7 +88,7 @@ class HomeViewModel(
)
}
HomeScreenType.Mentions -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
kinds = arrayOf(
TextNoteEvent.KIND,
RepostEvent.KIND,
@@ -109,7 +109,7 @@ class HomeViewModel(
)
}
HomeScreenType.Messages -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
kinds = arrayOf(
GiftWrapEvent.KIND,
),

View File

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

View File

@@ -96,7 +96,7 @@ class MetadataEventDetailViewModel(
metadataEventDetailType: MetadataEventDetailType
) = when (metadataEventDetailType) {
MetadataEventDetailType.Posts -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -108,7 +108,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Replies -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -121,7 +121,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Articles -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -132,7 +132,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Followers -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -144,7 +144,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Following -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -155,7 +155,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Zaps -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -167,7 +167,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Photos -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -178,7 +178,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Shorts -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -189,7 +189,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Videos -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -200,7 +200,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Bookmarks -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -211,7 +211,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Reports -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -222,7 +222,7 @@ class MetadataEventDetailViewModel(
)
}
MetadataEventDetailType.Relays -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(
eventPublicKey
),
@@ -267,7 +267,7 @@ class MetadataEventDetailViewModel(
followUsers.map { it }
nostrRepository.saveUnsignedNostrEvent(
_root_ide_package_.ac.cord.compose.database.model.UnsignedNostrEvent(
_root_ide_package_.at.torch.compose.database.model.UnsignedNostrEvent(
pubKey = activeUserPublicKey,
kind = ContactListEvent.KIND,
tags = contactListTagList.toTypedArray(),
@@ -294,7 +294,7 @@ class MetadataEventDetailViewModel(
logger.d("User is not being followed so no need to unfollow: $eventPublicKey")
} else {
nostrRepository.saveUnsignedNostrEvent(
_root_ide_package_.ac.cord.compose.database.model.UnsignedNostrEvent(
_root_ide_package_.at.torch.compose.database.model.UnsignedNostrEvent(
pubKey = activeUserPublicKey,
kind = ContactListEvent.KIND,
tags = contactListEvent.tags.filter { it.size > 1 && it[1] != eventPublicKey }

View File

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

View File

@@ -94,7 +94,7 @@ class NotaryViewModel(
nostrRepository.publishNostrEvent(
unsignedNostrEvent,
_root_ide_package_.ac.cord.compose.database.model.NostrEvent(
_root_ide_package_.at.torch.compose.database.model.NostrEvent(
id = event.id,
pubKey = event.pubKey,
kind = event.kind,

View File

@@ -56,7 +56,7 @@ class SearchResultViewModel(
logger.d("initiateSearchResults")
val synchronizationFilter = when (searchResultType) {
SearchResultType.Posts -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
kinds = arrayOf(
TextNoteEvent.KIND,
RepostEvent.KIND,
@@ -68,7 +68,7 @@ class SearchResultViewModel(
)
}
SearchResultType.Profiles -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
kinds = arrayOf(
MetadataEvent.KIND,
),
@@ -77,7 +77,7 @@ class SearchResultViewModel(
)
}
SearchResultType.Articles -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
kinds = arrayOf(
LongTextNoteEvent.KIND,
),
@@ -86,7 +86,7 @@ class SearchResultViewModel(
)
}
SearchResultType.Photos -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
kinds = arrayOf(
PictureEvent.KIND,
),
@@ -96,7 +96,7 @@ class SearchResultViewModel(
)
}
SearchResultType.Videos -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
kinds = arrayOf(
VideoNormalEvent.KIND,
),
@@ -106,7 +106,7 @@ class SearchResultViewModel(
)
}
SearchResultType.Shorts -> {
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
kinds = arrayOf(
VideoShortEvent.KIND,
),
@@ -140,7 +140,7 @@ class SearchResultViewModel(
// Sync Notifications... might want to also run this in the background
searchRepository.submitSearch(
_root_ide_package_.at.torch.compose.nostr.Relays.eventFinderRelaySet.take(1).map { normalizedRelay -> // TODO: Search all relays instead of the first
_root_ide_package_.ac.cord.compose.database.model.SynchronizeNostrEventRequest(
_root_ide_package_.at.torch.compose.database.model.SynchronizeNostrEventRequest(
purpose = "search",
synchronizationFilters = arrayOf(
synchronizationFilter

View File

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

View File

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

View File

@@ -211,7 +211,7 @@ class SovereignWalletViewModel(
}
fun getGlobalPrefs(): GlobalPrefs {
return _root_ide_package_.ac.cord.compose.extensions.getGlobalPrefs(
return _root_ide_package_.at.torch.compose.extensions.getGlobalPrefs(
phoenixGlobal
)
}

View File

@@ -43,9 +43,9 @@ class SynchronizationViewModel(
val scope: CoroutineScope,
): ViewModel() {
val relaysSocketManager = _root_ide_package_.ac.cord.compose.network.relays.RelaysSocketManager(
val relaysSocketManager = _root_ide_package_.at.torch.compose.network.relays.RelaysSocketManager(
activeWalletStateFlow = activeWalletStateFlow,
nostrSocketClientFactory = _root_ide_package_.ac.cord.compose.network.sockets.NostrSocketClientFactory,
nostrSocketClientFactory = _root_ide_package_.at.torch.compose.network.sockets.NostrSocketClientFactory,
cachingImportRepository = _root_ide_package_.at.torch.compose.repository.CachingImportRepository.Companion.NO_OP_CACHING_IMPORT_REPOSITORY,
relayRepository = relayRepository,
)
@@ -306,10 +306,10 @@ class SynchronizationViewModel(
// Schedule a sync from this relay...
nostrRepository.queueSynchronizeNostrEvent(
listOf(
_root_ide_package_.ac.cord.compose.database.model.SynchronizeNostrEventRequest(
_root_ide_package_.at.torch.compose.database.model.SynchronizeNostrEventRequest(
purpose = negentropySynchronizeRequest.purpose,
synchronizationFilters = arrayOf(
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
ids = result.needIds.map { it.toHexString() }
.toTypedArray()
)
@@ -322,7 +322,7 @@ class SynchronizationViewModel(
}
val eventIds = events.map { it.id }
val broadcastNostrEventRequests = result.sendIds.filter { it.toHexString() in eventIds }.map { sendId ->
_root_ide_package_.ac.cord.compose.database.model.BroadcastNostrEventRequest(
_root_ide_package_.at.torch.compose.database.model.BroadcastNostrEventRequest(
nostrEventId = sendId.toHexString(),
relayURL = negentropySynchronizeRequest.relayURL
)

View File

@@ -58,10 +58,10 @@ class UnqueuedProfileSynchronizationViewModel(
nostrRepository.queueSynchronizeNostrEvent(
_root_ide_package_.at.torch.compose.nostr.Relays.eventPublishRelaySet.map { normalizedRelayUrl ->
_root_ide_package_.ac.cord.compose.database.model.SynchronizeNostrEventRequest(
_root_ide_package_.at.torch.compose.database.model.SynchronizeNostrEventRequest(
purpose = "sign-in",
synchronizationFilters = arrayOf(
_root_ide_package_.ac.cord.compose.database.model.types.SynchronizationFilter(
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
authors = arrayOf(profilePublicKey),
kinds = arrayOf(
MetadataEvent.KIND,

View File

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

View File

@@ -1,13 +1,18 @@
package fr.acinq.phoenix.data
import aux.composeapp.generated.resources.Res
import aux.composeapp.generated.resources.*
import fr.acinq.lightning.io.TcpSocket
import fr.acinq.lightning.payment.LiquidityPolicy
import fr.acinq.lightning.utils.ServerAddress
import fr.acinq.phoenix.utils.extensions.isOnion
import kotlinx.serialization.Serializable
import org.jetbrains.compose.resources.getString
import torch.composeapp.generated.resources.Res
import torch.composeapp.generated.resources.currency_ars_bm
import torch.composeapp.generated.resources.currency_ars_official
import torch.composeapp.generated.resources.currency_cup_fm
import torch.composeapp.generated.resources.currency_cup_official
import torch.composeapp.generated.resources.currency_lbp_bm
import torch.composeapp.generated.resources.currency_lbp_official
sealed interface CurrencyUnit {

View File

@@ -1,8 +1,6 @@
package fr.acinq.phoenix.data
import androidx.compose.runtime.Composable
import aux.composeapp.generated.resources.Res
import aux.composeapp.generated.resources.*
import fr.acinq.lightning.db.AutomaticLiquidityPurchasePayment
import fr.acinq.lightning.db.Bolt11IncomingPayment
import fr.acinq.lightning.db.Bolt12IncomingPayment
@@ -20,6 +18,8 @@ import fr.acinq.phoenix.data.lnurl.LnurlPay
import fr.acinq.phoenix.utils.converters.AmountFormatter.toPrettyString
import fr.acinq.phoenix.utils.extensions.desc
import org.jetbrains.compose.resources.stringResource
import torch.composeapp.generated.resources.Res
import torch.composeapp.generated.resources.*
/**
* Represents a payment & its associated metadata.