- Adds a sync Signer to facilitate library

- Separates Account actions from Account state in two objects
- Changes Startup procedures to start with Account state and not the full account object
- Moves scope for flows in Account from an Application-wide scope to ViewModel scope
- Removes all LiveData objects from Account in favor of flows from the state object
- Migrates settings saving logic to flows
- Migrates PushNotification services to work without Account and only Account Settings.
- Migrates the spam filter from LiveData to Flows
- Adds Default lists for NIP-65 inbox and outbox relays
- Adds Default lists for Search relays
- Adds local backup for UserMetadata objects
- Adds local backup for Mute lists
- Adds local backup for NIP-65 relays
- Adds local backup for DM Relays
- Adds local backup for private home relays
- Rewrites state flows initializers to avoid inconsistent startups
This commit is contained in:
Vitor Pamplona
2024-08-26 14:42:55 -04:00
parent f3161ada8d
commit 4e3b6d0299
72 changed files with 2296 additions and 1736 deletions

View File

@@ -41,17 +41,7 @@ class SinceAuthorPerRelayFilter(
// don't send it.
override fun isValidFor(forRelay: String) = authors == null || !authors[forRelay].isNullOrEmpty()
override fun toJson(forRelay: String): String {
// if authors is empty, but not null
val authorsForThisRelay =
if (authors != null) {
authors[forRelay]?.ifEmpty { null }
} else {
null
}
return FilterSerializer.toJson(ids, authors?.get(forRelay), kinds, tags, since?.get(forRelay)?.time, until, limit, search)
}
override fun toJson(forRelay: String): String = FilterSerializer.toJson(ids, authors?.get(forRelay), kinds, tags, since?.get(forRelay)?.time, until, limit, search)
override fun match(
event: Event,