diff --git a/amethyst/src/main/res/drawable/x.xml b/amethyst/src/main/res/drawable/x.xml index 39aa7a6d8..0c0f6adff 100644 --- a/amethyst/src/main/res/drawable/x.xml +++ b/amethyst/src/main/res/drawable/x.xml @@ -1,9 +1,10 @@ - + + android:fillColor="@color/white" + android:pathData="M10.053 7.988l5.631 8.024h-1.497L8.566 7.988H10.053zM21 6v12c0 1.657 -1.343 3 -3 3H6c-1.657 0 -3 -1.343 -3 -3V6c0 -1.657 1.343 -3 3 -3h12C19.657 3 21 4.343 21 6zM17.538 17l-4.186 -5.99L16.774 7h-1.311l-2.704 3.16L10.552 7H6.702l3.941 5.633L6.906 17h1.333l3.001 -3.516L13.698 17H17.538z" /> \ No newline at end of file diff --git a/quartz/src/main/java/com/vitorpamplona/quartz/events/MetadataEvent.kt b/quartz/src/main/java/com/vitorpamplona/quartz/events/MetadataEvent.kt index 7237426e9..b37017d8b 100644 --- a/quartz/src/main/java/com/vitorpamplona/quartz/events/MetadataEvent.kt +++ b/quartz/src/main/java/com/vitorpamplona/quartz/events/MetadataEvent.kt @@ -45,7 +45,7 @@ abstract class IdentityClaim( fun create( platformIdentity: String, proof: String, - ): IdentityClaim? { + ): IdentityClaim { val (platform, identity) = platformIdentity.split(':') return when (platform.lowercase()) { @@ -166,7 +166,7 @@ class MetadataEvent( .filter { it.firstOrNull() == "i" } .mapNotNull { try { - IdentityClaim.create(it.get(1), it.get(2)) + IdentityClaim.create(it[1], it[2]) } catch (e: Exception) { Log.e("MetadataEvent", "Can't parse identity [${it.joinToString { "," }}]", e) null @@ -265,26 +265,5 @@ class MetadataEvent( currentJson.put(key, value.trim()) } } - - fun createFromScratch( - newName: String, - signer: NostrSigner, - createdAt: Long = TimeUtils.now(), - onReady: (MetadataEvent) -> Unit, - ) { - val prop = ObjectMapper().createObjectNode() - prop.put("name", newName.trim()) - - val writer = StringWriter() - ObjectMapper().writeValue(writer, prop) - - val tags = mutableListOf>() - - tags.add( - arrayOf("alt", "User profile for $newName"), - ) - - signer.sign(createdAt, KIND, tags.toTypedArray(), writer.buffer.toString(), onReady) - } } }