refactor: rename ReplaceableVideoEvent to AddressableVideoEvent

This commit is contained in:
davotoula
2026-06-10 20:32:57 +02:00
parent 638486ea1f
commit d90574c4e9
5 changed files with 7 additions and 7 deletions
@@ -32,8 +32,8 @@ import com.vitorpamplona.amethyst.ui.dal.FilterByListParams
import com.vitorpamplona.quartz.experimental.profileGallery.ProfileGalleryEntryEvent
import com.vitorpamplona.quartz.nip53LiveActivities.clip.LiveActivitiesClipEvent
import com.vitorpamplona.quartz.nip68Picture.PictureEvent
import com.vitorpamplona.quartz.nip71Video.AddressableVideoEvent
import com.vitorpamplona.quartz.nip71Video.RegularVideoEvent
import com.vitorpamplona.quartz.nip71Video.ReplaceableVideoEvent
import com.vitorpamplona.quartz.nip71Video.VideoVerticalEvent
class UserProfileGalleryFeedFilter(
@@ -81,7 +81,7 @@ class UserProfileGalleryFeedFilter(
(
noteEvent is PictureEvent ||
noteEvent is RegularVideoEvent ||
(noteEvent is ReplaceableVideoEvent && it is AddressableNote) ||
(noteEvent is AddressableVideoEvent && it is AddressableNote) ||
(noteEvent is ProfileGalleryEntryEvent && noteEvent.hasUrl() && noteEvent.hasFromEvent())
)
@@ -37,7 +37,7 @@ import com.vitorpamplona.quartz.nip94FileMetadata.tags.HashSha256Tag
import com.vitorpamplona.quartz.nip94FileMetadata.tags.MimeTypeTag
@Immutable
abstract class ReplaceableVideoEvent(
abstract class AddressableVideoEvent(
id: HexKey,
pubKey: HexKey,
createdAt: Long,
@@ -40,7 +40,7 @@ class VideoHorizontalEvent(
tags: Array<Array<String>>,
content: String,
sig: HexKey,
) : ReplaceableVideoEvent(id, pubKey, createdAt, KIND, tags, content, sig),
) : AddressableVideoEvent(id, pubKey, createdAt, KIND, tags, content, sig),
RootScope {
companion object {
const val KIND = 34235
@@ -40,7 +40,7 @@ class VideoVerticalEvent(
tags: Array<Array<String>>,
content: String,
sig: HexKey,
) : ReplaceableVideoEvent(id, pubKey, createdAt, KIND, tags, content, sig),
) : AddressableVideoEvent(id, pubKey, createdAt, KIND, tags, content, sig),
RootScope {
companion object {
const val KIND = 34236
@@ -31,7 +31,7 @@ import kotlin.test.assertEquals
* AddressableNote than the one `a` tags point to, so quotes/reposts of
* these videos never resolve on screen.
*/
class ReplaceableVideoEventAddressTest {
class AddressableVideoEventAddressTest {
// Fixture from a real kind-34236 event published by the Divine client
// (bfe2f224…, "Lunchtime for our Koi"); the horizontal test reuses the
// same data synthetically.
@@ -40,7 +40,7 @@ class ReplaceableVideoEventAddressTest {
private fun assertAddressUsesDTag(
kind: Int,
event: ReplaceableVideoEvent,
event: AddressableVideoEvent,
) {
assertEquals(dTag, event.dTag())
assertEquals(Address(kind, pubkey, dTag), event.address())