remove commented code

This commit is contained in:
greenart7c3
2024-06-24 14:03:01 -03:00
parent 9ee2452430
commit 8c3e87339a

View File

@@ -25,6 +25,7 @@ import com.vitorpamplona.ammolite.service.checkNotInMainThread
import com.vitorpamplona.quartz.events.Event import com.vitorpamplona.quartz.events.Event
import com.vitorpamplona.quartz.utils.TimeUtils import com.vitorpamplona.quartz.utils.TimeUtils
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.SupervisorJob
@@ -152,6 +153,7 @@ abstract class NostrDataSource(val debugName: String) {
resetFilters() resetFilters()
} }
@OptIn(DelicateCoroutinesApi::class)
open fun stop() { open fun stop() {
active = false active = false
println("DataSource: ${this.javaClass.simpleName} Stop") println("DataSource: ${this.javaClass.simpleName} Stop")
@@ -202,7 +204,7 @@ abstract class NostrDataSource(val debugName: String) {
scope.launch(Dispatchers.IO) { resetFiltersSuspend() } scope.launch(Dispatchers.IO) { resetFiltersSuspend() }
} }
fun resetFiltersSuspend() { private fun resetFiltersSuspend() {
println("DataSource: ${this.javaClass.simpleName} resetFiltersSuspend $active") println("DataSource: ${this.javaClass.simpleName} resetFiltersSuspend $active")
checkNotInMainThread() checkNotInMainThread()
@@ -273,22 +275,12 @@ abstract class NostrDataSource(val debugName: String) {
open fun consume( open fun consume(
event: Event, event: Event,
relay: Relay, relay: Relay,
) { ) = Unit
// LocalCache.verifyAndConsume(event, relay)
}
open fun markAsSeenOnRelay( open fun markAsSeenOnRelay(
eventId: String, eventId: String,
relay: Relay, relay: Relay,
) { ) = Unit
// val note = LocalCache.getNoteIfExists(eventId)
// val noteEvent = note?.event
// if (noteEvent is AddressableEvent) {
// LocalCache.getAddressableNoteIfExists(noteEvent.address().toTag())?.addRelay(relay)
// } else {
// note?.addRelay(relay)
// }
}
open fun markAsEOSE( open fun markAsEOSE(
subscriptionId: String, subscriptionId: String,