Add deterministic id on MLS related models
This commit is contained in:
1 parent
0957f710d9
commit
aad97bdd9e
27 files changed
+633
-397
No files matched your search
+1
-1
@@ -287,7 +287,7 @@ private fun ChatRoomDetailScreenPreview() {
|
||||
id = "",
|
||||
userPublicKey = "",
|
||||
subject = "Message title",
|
||||
initialGiftWrapPayloadId = 0,
|
||||
initialGiftWrapPayloadId = "sdfaer",
|
||||
mlsGroupState = null
|
||||
),
|
||||
)
|
||||
|
||||
+6
-4
@@ -25,6 +25,7 @@ import at.torch.compose.ui.composable.navigation.routes.ChatRoomCreationRoute
|
||||
import at.torch.compose.ui.composable.navigation.routes.LoadingRoute
|
||||
import at.torch.compose.ui.composable.navigation.routes.NostrEventDetailRoute
|
||||
import at.torch.compose.ui.composable.navigation.routes.ShareProfileRoute
|
||||
import at.torch.compose.ui.composable.navigation.routes.SocialPreconditionRoute
|
||||
import at.torch.compose.ui.composable.navigation.routes.SovereignWalletStartupRoute
|
||||
import at.torch.compose.ui.composable.navigation.routes.WriteNewNoteRoute
|
||||
import at.torch.compose.ui.view.state.NavigationUIState
|
||||
@@ -101,6 +102,7 @@ fun TorchNavHost(
|
||||
scope = applicationIOScope
|
||||
)
|
||||
)
|
||||
|
||||
// TODO: Produce a notary UI Element...
|
||||
val synchronizationViewModel: at.torch.compose.ui.view.model.SynchronizationViewModel = viewModel(
|
||||
factory = at.torch.compose.ui.view.model.SynchronizationViewModel.factory(
|
||||
@@ -203,7 +205,7 @@ fun TorchNavHost(
|
||||
}
|
||||
is NavigationUIState.ProfileLoaded -> {
|
||||
navController.navigate(
|
||||
route = at.torch.compose.ui.composable.navigation.routes.SocialPreconditionRoute(
|
||||
route = SocialPreconditionRoute(
|
||||
activeUserPubkey = state.publicKey
|
||||
)
|
||||
) {
|
||||
@@ -339,7 +341,7 @@ fun TorchNavHost(
|
||||
},
|
||||
onNavigateToNostrEvent = { hexKey ->
|
||||
navController.navigate(
|
||||
route = at.torch.compose.ui.composable.navigation.routes.NostrEventDetailRoute(
|
||||
route = NostrEventDetailRoute(
|
||||
activeUserPublicKey = route.activeUserPublicKey,
|
||||
nostrEventId = hexKey
|
||||
)
|
||||
@@ -383,8 +385,8 @@ fun TorchNavHost(
|
||||
|
||||
at.torch.compose.ui.composable.UnannouncedProfileScreen()
|
||||
}
|
||||
composable<at.torch.compose.ui.composable.navigation.routes.SocialPreconditionRoute> { backStackEntry ->
|
||||
val route = backStackEntry.toRoute<at.torch.compose.ui.composable.navigation.routes.SocialPreconditionRoute>()
|
||||
composable<SocialPreconditionRoute> { backStackEntry ->
|
||||
val route = backStackEntry.toRoute<SocialPreconditionRoute>()
|
||||
at.torch.compose.ui.composable.SocialPreconditionScreen(
|
||||
onNavigateToSkipForNow = {
|
||||
navController.navigate(
|
||||
|
||||
+2
-2
@@ -105,7 +105,8 @@ class CreateProfileViewModel(
|
||||
)
|
||||
|
||||
val pubkey = localKeyManager.nostrPublicKey()
|
||||
val keyPackageBundle = nostrRepository.createNewProfile(
|
||||
|
||||
nostrRepository.createNewProfile(
|
||||
pubkey,
|
||||
name = createProfileFormState.nameField.textFieldState.text.toString(),
|
||||
biography = createProfileFormState.biographyField.textFieldState.text.toString()
|
||||
@@ -113,7 +114,6 @@ class CreateProfileViewModel(
|
||||
|
||||
marmotRepository.saveMarmotKeyPackageBundle(
|
||||
publicKey = pubkey,
|
||||
keyPackageBundle,
|
||||
nsecPassword = localKeyManager.nsecPassword()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ class NotaryViewModel(
|
||||
init {
|
||||
scope.launch {
|
||||
activeWalletStateFlow.collectLatest { activeWallet ->
|
||||
logger.d("activeWallet: $activeWallet")
|
||||
logger.d("Notary ActiveWallet: $activeWallet")
|
||||
activeWallet?.business?.walletManager?.keyManager?.value?.nostrPrivateKey()?.let { nostrPrivateKey ->
|
||||
|
||||
val keyPair = KeyPair(
|
||||
|
||||
+1
@@ -74,6 +74,7 @@ class SynchronizationViewModel(
|
||||
init {
|
||||
scope.launch {
|
||||
activeWalletStateFlow.collectLatest { activeWallet ->
|
||||
logger.d("Synchronization ActiveWallet: $activeWallet")
|
||||
activeWallet?.business?.walletManager?.keyManager?.value?.nostrPrivateKey()?.let { nostrPrivateKey ->
|
||||
val keyPair = KeyPair(
|
||||
privKey = nostrPrivateKey.value.toByteArray()
|
||||
|
||||
Reference in new issue
Block a user