fixes imports

This commit is contained in:
nrobi144
2026-01-01 07:55:31 +02:00
parent 3750c7e26e
commit 4bc7e86448
14 changed files with 125 additions and 70 deletions
@@ -24,8 +24,7 @@ import com.vitorpamplona.quartz.nip47WalletConnect.LnZapPaymentRequestEvent
import com.vitorpamplona.quartz.nip47WalletConnect.LnZapPaymentResponseEvent
import com.vitorpamplona.quartz.nip47WalletConnect.Request
import com.vitorpamplona.quartz.nip47WalletConnect.Response
import com.vitorpamplona.quartz.nip57Zaps.LnZapPrivateEvent
import com.vitorpamplona.quartz.nip57Zaps.LnZapRequestEvent
import com.vitorpamplona.quartz.nip57Zaps.IPrivateZapsDecryptionCache
import com.vitorpamplona.quartz.utils.DualCase
/**
@@ -40,16 +39,6 @@ interface INwcSignerState {
fun isNIP47Author(pubKey: String?): Boolean
}
/**
* Interface for private zap decryption cache.
* Used by Note.kt for checking private zap status.
*/
interface IPrivateZapsDecryptionCache {
fun cachedPrivateZap(event: LnZapRequestEvent): LnZapPrivateEvent?
suspend fun decryptPrivateZap(event: LnZapRequestEvent): LnZapPrivateEvent?
}
/**
* Hidden content settings for filtering notes.
* Used by Note.isHiddenFor() to check if content should be hidden.
@@ -59,7 +48,13 @@ data class LiveHiddenUsers(
val hiddenWordsCase: List<DualCase>,
val hiddenUsersHashCodes: Set<Int>,
val spammersHashCodes: Set<Int>,
)
// Raw sets for amethyst-specific usage
val hiddenUsers: Set<String> = emptySet(),
val spammers: Set<String> = emptySet(),
val hiddenWords: Set<String> = emptySet(),
) {
fun isUserHidden(userHex: String) = hiddenUsers.contains(userHex) || spammers.contains(userHex)
}
/**
* Interface for account operations needed by Note.kt.
@@ -0,0 +1,33 @@
/**
* Copyright (c) 2025 Vitor Pamplona
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.vitorpamplona.amethyst.commons.model.trustedAssertions
import com.vitorpamplona.quartz.experimental.trustedAssertions.list.tags.ServiceProviderTag
import kotlinx.coroutines.flow.StateFlow
/**
* Interface for trust provider list state.
* Used by UserCardsCache for accessing user rank and follower count providers.
*/
interface TrustProviderListState {
val liveUserRankProvider: StateFlow<ServiceProviderTag?>
val liveUserFollowerCount: StateFlow<ServiceProviderTag?>
}
@@ -136,15 +136,3 @@ class UserCardsCache : UserDependencies {
}
}.flowOn(Dispatchers.IO)
}
// Placeholder for TrustProviderListState - will be properly extracted later
// For now, this allows UserCardsCache to compile
interface TrustProviderListState {
val liveUserRankProvider: kotlinx.coroutines.flow.StateFlow<ServiceProviderTag?>
val liveUserFollowerCount: kotlinx.coroutines.flow.StateFlow<ServiceProviderTag?>
}
// Placeholder for ServiceProviderTag
interface ServiceProviderTag {
val pubkey: String
}