Skip to content

Commit

Permalink
Convert dachlatten-flow to Kotlin-only lib
Browse files Browse the repository at this point in the history
  • Loading branch information
janseeger committed Feb 23, 2024
1 parent 5939225 commit 8da45a0
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
3 changes: 1 addition & 2 deletions dachlatten-flow/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
id("android-library-base")
id("kotlin-library")
id("kotlin-library-unit-test")
id("android-library-release")
}

dependencies {
Expand Down
3 changes: 0 additions & 3 deletions dachlatten-flow/src/main/AndroidManifest.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.onStart
import kotlin.time.Duration

fun tickEvery(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package de.sipgate.dachlatten.flow

import android.util.Log
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.map

inline fun <T> Flow<T>.printFlow(
tag: String = "from flow",
crossinline printFunc: (String) -> Unit = { content -> Log.d(tag, content) },
crossinline printFunc: (String) -> Unit = { content -> println("$tag: $content") },
crossinline stringFunc: (T?) -> String? = { it.toString() }
) = map {
printFunc(stringFunc(it) ?: "null")
Expand Down

0 comments on commit 8da45a0

Please sign in to comment.