Functions shouldn't be empty

This commit is contained in:
davotoula
2026-03-03 10:03:01 +00:00
parent b1a1ccc145
commit 2d42556b03
10 changed files with 23 additions and 6 deletions
@@ -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 {
@@ -91,6 +91,7 @@ class MeltProcessor {
onError: (String, String) -> Unit,
context: Context,
) {
// TODO: Implement Cashu token melting via Lightning invoice
}
suspend fun feeCalculator(
@@ -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
}
}
@@ -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,
@@ -106,7 +106,9 @@ class ChannelFeedContentState(
}
}
fun deleteFromFeed(deletedNotes: Set<Note>) {}
fun deleteFromFeed(deletedNotes: Set<Note>) {
// TODO: Implement deletion of notes from the channel feed
}
fun refreshFromOldState(newItems: Set<Note>) {
val oldNotesState = _feedContent.value
@@ -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?) {}
@@ -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
@@ -141,6 +141,7 @@ class EventProcessor(
}
interface EventHandler<T : IEvent> {
// Default no-ops; implementations override only the operations they handle
suspend fun add(
event: T,
eventNote: Note,
@@ -352,6 +352,7 @@ class CardFeedContentState(
}
fun deleteFromFeed(deletedNotes: Set<Note>) {
// TODO: Implement deletion of notes from the notification feed
}
private fun refreshFromOldState(newItems: Set<Note>) {
@@ -57,5 +57,6 @@ class ConnectedRelayListViewModel : BasicRelaySetupInfoModel() {
.sorted()
override suspend fun saveRelayList(urlList: List<NormalizedRelayUrl>) {
// Connected relays are read-only; saving is not applicable
}
}