fix: track KeyPackage published status and subscribe to own key packages
The publish KeyPackage button was always active because the app didn't track whether a key package had already been published. This adds: - hasActiveKeyPackages() to KeyPackageRotationManager and MarmotManager - hasPublishedKeyPackage() to Account, checking both in-memory bundles and the local cache for existing kind:30443 events - Own key package filter in MarmotSubscriptionManager and the EOSE manager so previously published key packages are downloaded from relays on app restart - UI feedback: primary-colored key icon when published, contextual empty-state message, and a spinner during publishing https://claude.ai/code/session_01BVe7aSEWd2KLi5Ks6RZkcc
This commit is contained in:
+6
@@ -248,6 +248,12 @@ class MarmotManager(
|
||||
*/
|
||||
fun needsKeyPackageRotation(): Boolean = keyPackageRotationManager.needsRotation()
|
||||
|
||||
/**
|
||||
* Check if there are active (locally generated) KeyPackages.
|
||||
* Returns true if at least one KeyPackage has been generated and not yet consumed.
|
||||
*/
|
||||
fun hasActiveKeyPackages(): Boolean = keyPackageRotationManager.hasActiveKeyPackages()
|
||||
|
||||
/**
|
||||
* Check if a specific group membership exists.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user