mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 16:14:40 +00:00
refactor: rename ReplaceableVideoEvent to AddressableVideoEvent
This commit is contained in:
+2
-2
@@ -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())
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -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,
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+2
-2
@@ -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())
|
||||
Reference in New Issue
Block a user