diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/LocalCache.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/LocalCache.kt index 7425a9bb2..87e6dc3f3 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/LocalCache.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/LocalCache.kt @@ -229,7 +229,9 @@ interface ILocalCache { fun markAsSeen( eventId: String, relay: NormalizedRelayUrl, - ) {} + ) { + // Default no-op; implementations may override to track seen events per relay + } } object LocalCache : ILocalCache, ICacheProvider { diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/cashu/melt/MeltProcessor.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/cashu/melt/MeltProcessor.kt index 72f010dca..d12b1ea08 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/cashu/melt/MeltProcessor.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/cashu/melt/MeltProcessor.kt @@ -91,6 +91,7 @@ class MeltProcessor { onError: (String, String) -> Unit, context: Context, ) { + // TODO: Implement Cashu token melting via Lightning invoice } suspend fun feeCalculator( diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/uploads/FileHeader.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/uploads/FileHeader.kt index 35a615d58..49abc9616 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/uploads/FileHeader.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/uploads/FileHeader.kt @@ -110,5 +110,7 @@ class ByteArrayMediaDataSource( } @Throws(IOException::class) - override fun close() {} + override fun close() { + // No resources to release; data is an in-memory byte array + } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/uploads/VideoCompressionHelper.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/uploads/VideoCompressionHelper.kt index 9484e5e07..8f98f6fb9 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/uploads/VideoCompressionHelper.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/uploads/VideoCompressionHelper.kt @@ -199,12 +199,16 @@ object VideoCompressionHelper { ), listener = object : CompressionListener { - override fun onStart(index: Int) {} + override fun onStart(index: Int) { + // No action needed on compression start + } override fun onProgress( index: Int, percent: Float, - ) {} + ) { + // Progress tracking not needed for this use case + } override fun onSuccess( index: Int, diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/components/markdown/RenderContentAsMarkdown.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/components/markdown/RenderContentAsMarkdown.kt index d03a84f61..67bc8981e 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/components/markdown/RenderContentAsMarkdown.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/components/markdown/RenderContentAsMarkdown.kt @@ -117,6 +117,8 @@ fun RenderContentAsMarkdown( } } +private const val PREVIEW_CALLBACK_URI = "nostr:something" + @Preview @Composable fun RenderContentAsMarkdownPreview() { @@ -162,7 +164,7 @@ fun RenderContentAsMarkdownPreview() { remember { mutableStateOf(background) }, - callbackUri = "nostr:something", + callbackUri = PREVIEW_CALLBACK_URI, accountViewModel = accountViewModel, nav = nav, ) @@ -212,7 +214,7 @@ fun RenderContentAsMarkdownListsPreview() { remember { mutableStateOf(background) }, - callbackUri = "nostr:something", + callbackUri = PREVIEW_CALLBACK_URI, accountViewModel = accountViewModel, nav = nav, ) @@ -266,7 +268,7 @@ fun RenderContentAsMarkdownCodePreview() { remember { mutableStateOf(background) }, - callbackUri = "nostr:something", + callbackUri = PREVIEW_CALLBACK_URI, accountViewModel = accountViewModel, nav = nav, ) @@ -306,7 +308,7 @@ fun RenderContentAsMarkdownTablesPreview() { remember { mutableStateOf(background) }, - callbackUri = "nostr:something", + callbackUri = PREVIEW_CALLBACK_URI, accountViewModel = accountViewModel, nav = nav, ) @@ -344,7 +346,7 @@ fun RenderContentAsMarkdownFootNotesPreview() { remember { mutableStateOf(background) }, - callbackUri = "nostr:something", + callbackUri = PREVIEW_CALLBACK_URI, accountViewModel = accountViewModel, nav = nav, ) @@ -405,7 +407,7 @@ fun RenderContentAsMarkdownUserPreview() { remember { mutableStateOf(background) }, - callbackUri = "nostr:something", + callbackUri = PREVIEW_CALLBACK_URI, accountViewModel = accountViewModel, nav = nav, ) @@ -455,7 +457,7 @@ fun RenderContentAsMarkdownNotePreview() { remember { mutableStateOf(background) }, - callbackUri = "nostr:something", + callbackUri = PREVIEW_CALLBACK_URI, accountViewModel = accountViewModel, nav = nav, ) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/feeds/ChannelFeedContentState.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/feeds/ChannelFeedContentState.kt index 49fa16623..ba25e3a42 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/feeds/ChannelFeedContentState.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/feeds/ChannelFeedContentState.kt @@ -106,7 +106,9 @@ class ChannelFeedContentState( } } - fun deleteFromFeed(deletedNotes: Set) {} + fun deleteFromFeed(deletedNotes: Set) { + // TODO: Implement deletion of notes from the channel feed + } fun refreshFromOldState(newItems: Set) { val oldNotesState = _feedContent.value diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/layouts/ChatHeaderLayout.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/layouts/ChatHeaderLayout.kt index aa5152f64..44b025b61 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/layouts/ChatHeaderLayout.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/layouts/ChatHeaderLayout.kt @@ -51,6 +51,9 @@ import com.vitorpamplona.amethyst.ui.theme.Size55Modifier import com.vitorpamplona.amethyst.ui.theme.ThemeComparisonColumn import com.vitorpamplona.quartz.utils.TimeUtils +private const val PREVIEW_AUTHOR = "This is my author" +private const val PREVIEW_MESSAGE = "This is a message from this person" + @Composable @Preview fun ChannelNamePreview() { @@ -65,11 +68,11 @@ fun ChannelNamePreview() { ) }, firstRow = { - Text("This is my author", Modifier.weight(1f)) + Text(PREVIEW_AUTHOR, Modifier.weight(1f)) TimeAgo(TimeUtils.now()) }, secondRow = { - Text("This is a message from this person", Modifier.weight(1f)) + Text(PREVIEW_MESSAGE, Modifier.weight(1f)) Spacer(modifier = Height4dpModifier) NewItemsBubble() }, @@ -81,13 +84,13 @@ fun ChannelNamePreview() { ListItem( headlineContent = { Row(verticalAlignment = Alignment.CenterVertically) { - Text("This is my author", Modifier.weight(1f)) + Text(PREVIEW_AUTHOR, Modifier.weight(1f)) TimeAgo(TimeUtils.now()) } }, supportingContent = { Row { - Text("This is a message from this person", Modifier.weight(1f)) + Text(PREVIEW_MESSAGE, Modifier.weight(1f)) NewItemsBubble() } }, @@ -106,13 +109,13 @@ fun ChannelNamePreview() { SlimListItem( headlineContent = { Row(verticalAlignment = Alignment.CenterVertically) { - Text("This is my author", Modifier.weight(1f)) + Text(PREVIEW_AUTHOR, Modifier.weight(1f)) TimeAgo(TimeUtils.now()) } }, supportingContent = { Row(verticalAlignment = Alignment.CenterVertically) { - Text("This is a message from this person", Modifier.weight(1f)) + Text(PREVIEW_MESSAGE, Modifier.weight(1f)) NewItemsBubble() } }, diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/layouts/listItem/SlimListItemLayout.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/layouts/listItem/SlimListItemLayout.kt index ffb54b2a3..d6d8925c9 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/layouts/listItem/SlimListItemLayout.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/layouts/listItem/SlimListItemLayout.kt @@ -80,6 +80,9 @@ import kotlin.math.max * This is a copy of Material3's ListItemLayout.kt file, with the only change being the padding change from 16.dp to 10.dp */ +private const val PREVIEW_AUTHOR = "This is my author" +private const val PREVIEW_MESSAGE = "This is a message from this person" + @Composable @Preview fun ChannelNamePreview() { @@ -94,11 +97,11 @@ fun ChannelNamePreview() { ) }, firstRow = { - Text("This is my author", Modifier.weight(1f)) + Text(PREVIEW_AUTHOR, Modifier.weight(1f)) TimeAgo(TimeUtils.now()) }, secondRow = { - Text("This is a message from this person", Modifier.weight(1f)) + Text(PREVIEW_MESSAGE, Modifier.weight(1f)) NewItemsBubble() }, onClick = {}, @@ -109,13 +112,13 @@ fun ChannelNamePreview() { SlimListItem( headlineContent = { Row(verticalAlignment = CenterVertically) { - Text("This is my author", Modifier.weight(1f)) + Text(PREVIEW_AUTHOR, Modifier.weight(1f)) TimeAgo(TimeUtils.now()) } }, supportingContent = { Row(verticalAlignment = CenterVertically) { - Text("This is a message from this person", Modifier.weight(1f)) + Text(PREVIEW_MESSAGE, Modifier.weight(1f)) Spacer(modifier = Height4dpModifier) NewItemsBubble() } @@ -135,13 +138,13 @@ fun ChannelNamePreview() { ListItem( headlineContent = { Row(verticalAlignment = CenterVertically) { - Text("This is my author", Modifier.weight(1f)) + Text(PREVIEW_AUTHOR, Modifier.weight(1f)) TimeAgo(TimeUtils.now()) } }, supportingContent = { Row(verticalAlignment = CenterVertically) { - Text("This is a message from this person", Modifier.weight(1f)) + Text(PREVIEW_MESSAGE, Modifier.weight(1f)) Spacer(modifier = Height4dpModifier) NewItemsBubble() } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/navs/EmptyNav.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/navs/EmptyNav.kt index c8dc1e3cc..aece94384 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/navs/EmptyNav.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/navs/EmptyNav.kt @@ -37,6 +37,7 @@ class EmptyNav : INav { override fun openDrawer() = runBlocking { drawerState.open() } + // All navigation methods are intentionally no-op; this is a stub for previews and tests override fun nav(route: Route) {} override fun nav(computeRoute: suspend () -> Route?) {} diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt index 128af382f..89874e20c 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt @@ -1542,33 +1542,38 @@ fun ReactionChoicePopupContent( } } +private const val EMOJI_ROCKET = "\uD83D\uDE80" +private const val EMOJI_THINKING = "\uD83E\uDD14" +private const val EMOJI_SCREAM = "\uD83D\uDE31" +private const val EMOJI_PARTY = "\uD83C\uDF89" + @Preview() @Composable fun ReactionChoicePopupPeeview() { ThemeComparisonColumn { ReactionChoicePopupContent( persistentListOf( - "\uD83D\uDE80", + EMOJI_ROCKET, "\uD83E\uDEC2", "\uD83D\uDC40", "\uD83D\uDE02", - "\uD83C\uDF89", - "\uD83E\uDD14", - "\uD83D\uDE31", - "\uD83E\uDD14", - "\uD83D\uDE31", + EMOJI_PARTY, + EMOJI_THINKING, + EMOJI_SCREAM, + EMOJI_THINKING, + EMOJI_SCREAM, "+", "-", - "\uD83C\uDF89", - "\uD83E\uDD14", - "\uD83D\uDE31", - "\uD83E\uDD14", - "\uD83D\uDE31", + EMOJI_PARTY, + EMOJI_THINKING, + EMOJI_SCREAM, + EMOJI_THINKING, + EMOJI_SCREAM, "\uD83D\uDE80\uDB40\uDD58\uDB40\uDD64\uDB40\uDD64\uDB40\uDD60\uDB40\uDD63\uDB40\uDD2A\uDB40\uDD1F\uDB40\uDD1F\uDB40\uDD53\uDB40\uDD54\uDB40\uDD5E\uDB40\uDD1E\uDB40\uDD63\uDB40\uDD51\uDB40\uDD64\uDB40\uDD55\uDB40\uDD5C\uDB40\uDD5C\uDB40\uDD59\uDB40\uDD64\uDB40\uDD55\uDB40\uDD1E\uDB40\uDD55\uDB40\uDD51\uDB40\uDD62\uDB40\uDD64\uDB40\uDD58\uDB40\uDD1F\uDB40\uDD29\uDB40\uDD24\uDB40\uDD27\uDB40\uDD55\uDB40\uDD24\uDB40\uDD51\uDB40\uDD52\uDB40\uDD22\uDB40\uDD54\uDB40\uDD23\uDB40\uDD21\uDB40\uDD21\uDB40\uDD25\uDB40\uDD52\uDB40\uDD55\uDB40\uDD25\uDB40\uDD26\uDB40\uDD25\uDB40\uDD51\uDB40\uDD24\uDB40\uDD29\uDB40\uDD53\uDB40\uDD56\uDB40\uDD25\uDB40\uDD54\uDB40\uDD52\uDB40\uDD20\uDB40\uDD22\uDB40\uDD25\uDB40\uDD25\uDB40\uDD29\uDB40\uDD56\uDB40\uDD23\uDB40\uDD21\uDB40\uDD20\uDB40\uDD53\uDB40\uDD51\uDB40\uDD20\uDB40\uDD51\uDB40\uDD26\uDB40\uDD54\uDB40\uDD54\uDB40\uDD56\uDB40\uDD54\uDB40\uDD54\uDB40\uDD52\uDB40\uDD54\uDB40\uDD24\uDB40\uDD52\uDB40\uDD54\uDB40\uDD28\uDB40\uDD53\uDB40\uDD52\uDB40\uDD55\uDB40\uDD53\uDB40\uDD24\uDB40\uDD24\uDB40\uDD29\uDB40\uDD29\uDB40\uDD25\uDB40\uDD53\uDB40\uDD22\uDB40\uDD55\uDB40\uDD27\uDB40\uDD1E\uDB40\uDD67\uDB40\uDD55\uDB40\uDD52\uDB40\uDD60", ), onClick = {}, onChangeAmount = {}, - toRemove = persistentSetOf("\uD83D\uDE80", "\uD83E\uDD14", "\uD83D\uDE31"), + toRemove = persistentSetOf(EMOJI_ROCKET, EMOJI_THINKING, EMOJI_SCREAM), ) } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/UserProfilePicture.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/UserProfilePicture.kt index 979b796ac..a5697d7d0 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/UserProfilePicture.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/UserProfilePicture.kt @@ -433,6 +433,10 @@ fun ObserveAndDrawInnerUserPicture( ) } +private const val PREVIEW_USER_HEX = "989c3734c46abac7ce3ce229971581a5a6ee39cdd6aa7261a55823fa7f8c4799" +private const val PREVIEW_PICTURE_URL = "http://null" +private const val PREVIEW_USER_NAME = "vitor" + @Preview @Composable fun ScoreTag55Preview() { @@ -442,9 +446,9 @@ fun ScoreTag55Preview() { var size = 75.dp Box(Modifier.size(size), contentAlignment = Alignment.TopEnd) { InnerUserPicture( - userHex = "989c3734c46abac7ce3ce229971581a5a6ee39cdd6aa7261a55823fa7f8c4799", - userPicture = "http://null", - userName = "vitor", + userHex = PREVIEW_USER_HEX, + userPicture = PREVIEW_PICTURE_URL, + userName = PREVIEW_USER_NAME, size = size, modifier = Modifier, accountViewModel = accountViewModel, @@ -455,9 +459,9 @@ fun ScoreTag55Preview() { size = 55.dp Box(Modifier.size(size), contentAlignment = Alignment.TopEnd) { InnerUserPicture( - userHex = "989c3734c46abac7ce3ce229971581a5a6ee39cdd6aa7261a55823fa7f8c4799", - userPicture = "http://null", - userName = "vitor", + userHex = PREVIEW_USER_HEX, + userPicture = PREVIEW_PICTURE_URL, + userName = PREVIEW_USER_NAME, size = size, modifier = Modifier, accountViewModel = accountViewModel, @@ -468,9 +472,9 @@ fun ScoreTag55Preview() { size = 35.dp Box(Modifier.size(size), contentAlignment = Alignment.TopEnd) { InnerUserPicture( - userHex = "989c3734c46abac7ce3ce229971581a5a6ee39cdd6aa7261a55823fa7f8c4799", - userPicture = "http://null", - userName = "vitor", + userHex = PREVIEW_USER_HEX, + userPicture = PREVIEW_PICTURE_URL, + userName = PREVIEW_USER_NAME, size = size, modifier = Modifier, accountViewModel = accountViewModel, @@ -481,9 +485,9 @@ fun ScoreTag55Preview() { size = 25.dp Box(Modifier.size(size), contentAlignment = Alignment.TopEnd) { InnerUserPicture( - userHex = "989c3734c46abac7ce3ce229971581a5a6ee39cdd6aa7261a55823fa7f8c4799", - userPicture = "http://null", - userName = "vitor", + userHex = PREVIEW_USER_HEX, + userPicture = PREVIEW_PICTURE_URL, + userName = PREVIEW_USER_NAME, size = size, modifier = Modifier, accountViewModel = accountViewModel, @@ -495,8 +499,8 @@ fun ScoreTag55Preview() { Box(Modifier.size(size), contentAlignment = Alignment.TopEnd) { InnerUserPicture( userHex = "AABBCC", - userPicture = "http://null", - userName = "vitor", + userPicture = PREVIEW_PICTURE_URL, + userName = PREVIEW_USER_NAME, size = size, modifier = Modifier, accountViewModel = accountViewModel, diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ZapCustomDialog.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ZapCustomDialog.kt index 2d9d789ae..0725f9dca 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ZapCustomDialog.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ZapCustomDialog.kt @@ -102,7 +102,9 @@ class ZapOptionViewModel : ViewModel() { fun value(): Long? = customAmount.text.trim().toLongOrNull() - fun cancel() {} + fun cancel() { + // No cleanup needed; dialog state is reset on close + } } @Composable diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/DecryptAndIndexProcessor.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/DecryptAndIndexProcessor.kt index 652d5c5e7..2b3eeeaf9 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/DecryptAndIndexProcessor.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/DecryptAndIndexProcessor.kt @@ -141,6 +141,7 @@ class EventProcessor( } interface EventHandler { + // Default no-ops; implementations override only the operations they handle suspend fun add( event: T, eventNote: Note, diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/lists/list/PeopleListItem.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/lists/list/PeopleListItem.kt index db37043e8..2ac13c5f7 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/lists/list/PeopleListItem.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/lists/list/PeopleListItem.kt @@ -71,6 +71,10 @@ import com.vitorpamplona.amethyst.ui.theme.SpacedBy2dp import com.vitorpamplona.amethyst.ui.theme.SpacedBy5dp import com.vitorpamplona.amethyst.ui.theme.ThemeComparisonColumn +private const val PREVIEW_LIST_TITLE = "Sample List Title" +private const val PREVIEW_LIST_DESCRIPTION = "Sample List Description" +private const val PREVIEW_LIST_IMAGE = "http://some.com/image.png" + @Preview() @Composable private fun PeopleListItemPreview() { @@ -82,8 +86,8 @@ private fun PeopleListItemPreview() { PeopleList( identifierTag = "00001-2222", title = "Sample List Title, Very long title, very very very long", - description = "Sample List Description", - image = "http://some.com/image.png", + description = PREVIEW_LIST_DESCRIPTION, + image = PREVIEW_LIST_IMAGE, emptySet(), emptySet(), ) @@ -91,9 +95,9 @@ private fun PeopleListItemPreview() { val samplePeopleList2 = PeopleList( identifierTag = "00001-2223", - title = "Sample List Title", - description = "Sample List Description", - image = "http://some.com/image.png", + title = PREVIEW_LIST_TITLE, + description = PREVIEW_LIST_DESCRIPTION, + image = PREVIEW_LIST_IMAGE, setOf(user1, user3), emptySet(), ) @@ -101,9 +105,9 @@ private fun PeopleListItemPreview() { val samplePeopleList3 = PeopleList( identifierTag = "00001-2224", - title = "Sample List Title", - description = "Sample List Description", - image = "http://some.com/image.png", + title = PREVIEW_LIST_TITLE, + description = PREVIEW_LIST_DESCRIPTION, + image = PREVIEW_LIST_IMAGE, emptySet(), setOf(user1, user3), ) @@ -111,9 +115,9 @@ private fun PeopleListItemPreview() { val samplePeopleList4 = PeopleList( identifierTag = "00001-2225", - title = "Sample List Title", - description = "Sample List Description", - image = "http://some.com/image.png", + title = PREVIEW_LIST_TITLE, + description = PREVIEW_LIST_DESCRIPTION, + image = PREVIEW_LIST_IMAGE, setOf(user3), setOf(user1, user2, user3), ) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/notifications/CardFeedContentState.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/notifications/CardFeedContentState.kt index 74a8e3345..eb53679fd 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/notifications/CardFeedContentState.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/notifications/CardFeedContentState.kt @@ -92,7 +92,7 @@ class CardFeedContentState( viewModelScope.launch(Dispatchers.IO) { _scrollToTop.emit(_scrollToTop.value + 1) } } - suspend fun sentToTop() { + fun sentToTop() { scrolltoTopPending = false } @@ -212,7 +212,7 @@ class CardFeedContentState( val zapRequest = event.zapRequest if (zapRequest != null) { - val zapRequestNote = LocalCache.getNoteIfExists(zapRequest.id) + val zapRequestNote = getNoteIfExists(zapRequest.id) if (zapRequestNote != null) { zapsPerUser .getOrPut(author, { mutableListOf() }) @@ -352,6 +352,7 @@ class CardFeedContentState( } fun deleteFromFeed(deletedNotes: Set) { + // TODO: Implement deletion of notes from the notification feed } private fun refreshFromOldState(newItems: Set) { diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/connected/ConnectedRelayListViewModel.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/connected/ConnectedRelayListViewModel.kt index 196646c91..58bd31dc1 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/connected/ConnectedRelayListViewModel.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/connected/ConnectedRelayListViewModel.kt @@ -57,5 +57,6 @@ class ConnectedRelayListViewModel : BasicRelaySetupInfoModel() { .sorted() override suspend fun saveRelayList(urlList: List) { + // Connected relays are read-only; saving is not applicable } }