Skip to content

Commit

Permalink
πŸ‘• format code
Browse files Browse the repository at this point in the history
  • Loading branch information
theapache64 committed Jul 11, 2022
1 parent 5967f57 commit c7ae0b3
Show file tree
Hide file tree
Showing 21 changed files with 28 additions and 40 deletions.
16 changes: 9 additions & 7 deletions .fleet/run.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"configurations": [
{
"type": "gradle",
"name": "Run App",
"tasks": ["run"]
}
]
"configurations": [
{
"type": "gradle",
"name": "Run App",
"tasks": [
"run"
]
}
]
}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
| Windows |[![Download Button](https://img.shields.io/static/v1?label=Windows&message=Stackzy.msi&color=30A3E6)](https://github.com/theapache64/stackzy/releases/latest)| Experimental |
| MacOS |[![Download Button](https://img.shields.io/static/v1?label=MacOS&message=Stackzy.jar&color=30A3E6)](https://github.com/theapache64/stackzy/releases/latest) | Experimental |

> ℹ️ To run the `jar`, you need Java 15 or above. If you hate running jar, you can clone the repo and execute `./gradlew createDistributable` to
> ℹ️ To run the `jar`, you need Java 15 or above. If you hate running jar, you can clone the repo and
> execute `./gradlew createDistributable` to
> build executable for your system.
## πŸ‹ Dependency
Expand Down
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ tasks.test {
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
kotlinOptions.freeCompilerArgs += "-Xuse-experimental=androidx.compose.foundation.ExperimentalFoundationApi"
kotlinOptions.freeCompilerArgs += "-Xuse-experimental=androidx.compose.ui.ExperimentalComposeUiApi"
kotlinOptions.freeCompilerArgs += "-Xuse-experimental=kotlin.io.path.ExperimentalPathApi"
kotlinOptions.jvmTarget = "15"
// kotlinOptions.freeCompilerArgs += "-Xuse-experimental=androidx.compose.foundation.ExperimentalFoundationApi"
// kotlinOptions.freeCompilerArgs += "-Xuse-experimental=androidx.compose.ui.ExperimentalComposeUiApi"
// kotlinOptions.freeCompilerArgs += "-Xuse-experimental=kotlin.io.path.ExperimentalPathApi"
}

tasks.withType<org.gradle.jvm.tasks.Jar> {
Expand Down
8 changes: 4 additions & 4 deletions data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ dependencies {
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "11"
kotlinOptions.freeCompilerArgs += "-Xuse-experimental=androidx.compose.foundation.ExperimentalFoundationApi"
kotlinOptions.freeCompilerArgs += "-Xuse-experimental=androidx.compose.ui.ExperimentalComposeUiApi"
kotlinOptions.freeCompilerArgs += "-Xuse-experimental=kotlin.io.path.ExperimentalPathApi"
kotlinOptions.jvmTarget = "15"
// kotlinOptions.freeCompilerArgs += "-Xuse-experimental=androidx.compose.foundation.ExperimentalFoundationApi"
// kotlinOptions.freeCompilerArgs += "-Xuse-experimental=androidx.compose.ui.ExperimentalComposeUiApi"
// kotlinOptions.freeCompilerArgs += "-Xuse-experimental=kotlin.io.path.ExperimentalPathApi"
}
16 changes: 8 additions & 8 deletions src/main/kotlin/com/theapache64/stackzy/ui/common/Selectable.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ fun Modifier.addHoverEffect(
}

return this.background(normalColor.copy(alpha = backgroundAlpha), RoundedCornerShape(cornerRadius)).clickable {
onClicked()
}.onPointerEvent(eventType = PointerEventType.Enter, onEvent = {
isHovered = true
}).onPointerEvent(eventType = PointerEventType.Exit, onEvent = {
isHovered = false
})
onClicked()
}.onPointerEvent(eventType = PointerEventType.Enter, onEvent = {
isHovered = true
}).onPointerEvent(eventType = PointerEventType.Exit, onEvent = {
isHovered = false
})
}

// Preview
Expand Down Expand Up @@ -102,8 +102,8 @@ fun <T : AlphabetCircle> Selectable(
) {

Row(modifier = modifier.fillMaxWidth().addHoverEffect(onClicked = {
onSelected(data)
}).padding(padding), verticalAlignment = Alignment.CenterVertically) {
onSelected(data)
}).padding(padding), verticalAlignment = Alignment.CenterVertically) {

if (data.imageUrl() == null) {
// Show only alphabet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.grid.GridCells
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
import androidx.compose.foundation.lazy.grid.items
import androidx.compose.foundation.lazy.items
import androidx.compose.material.*
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.Search
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
import javax.inject.Inject

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import com.theapache64.stackzy.util.R
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
import javax.inject.Inject

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.grid.GridCells
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
import androidx.compose.foundation.lazy.grid.items
import androidx.compose.foundation.lazy.items
import androidx.compose.material.Icon
import androidx.compose.material.OutlinedTextField
import androidx.compose.material.Text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import com.theapache64.stackzy.ui.util.getSingularOrPlural
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
import java.util.*
import javax.inject.Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import com.theapache64.stackzy.data.util.calladapter.flow.Resource
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
import java.awt.Desktop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.SharedFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
import java.io.IOException
import javax.inject.Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import kotlinx.coroutines.flow.MutableSharedFlow

/**
* To fire events.
* This flow won't fire the last value for each collect call.
* This flow won't fire the last value for each collect call.
* This observer will only be invoked on `tryEmit` calls.
* (replacement for SingleLiveEvent :D)
* Created by theapache64 : Jan 08 Fri,2021 @ 01:40
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.theapache64.stackzy.test.MyDaggerMockRule
import com.theapache64.stackzy.test.NATIVE_KOTLIN_PACKAGE_NAME
import com.theapache64.stackzy.test.runBlockingUnitTest
import it.cosenonjaviste.daggermock.InjectFromComponent
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.first
import org.junit.Rule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import com.toxicbakery.logging.Arbor
import it.cosenonjaviste.daggermock.InjectFromComponent
import org.junit.Rule
import org.junit.Test
import kotlinx.coroutines.flow.collect


class AuthRepoTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.toxicbakery.logging.Arbor
import it.cosenonjaviste.daggermock.InjectFromComponent
import org.junit.Rule
import org.junit.Test
import kotlinx.coroutines.flow.collect


class ConfigRepoTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import com.theapache64.stackzy.test.runBlockingUnitTest
import it.cosenonjaviste.daggermock.InjectFromComponent
import org.junit.Rule
import org.junit.Test
import kotlinx.coroutines.flow.collect

internal class LibrariesRepoTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import org.junit.Rule
import org.junit.Test
import org.junit.jupiter.api.BeforeAll
import org.junit.jupiter.api.TestInstance
import kotlinx.coroutines.flow.collect

@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class PlayStoreRepoTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import org.junit.Rule
import org.junit.Test
import org.junit.jupiter.api.BeforeAll
import kotlin.io.path.createTempDirectory
import kotlinx.coroutines.flow.collect

class ResultsRepoTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.theapache64.stackzy.test.runBlockingUnitTest
import it.cosenonjaviste.daggermock.InjectFromComponent
import org.junit.Rule
import org.junit.Test
import kotlinx.coroutines.flow.collect

internal class UntrackedLibsRepoTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import com.theapache64.stackzy.data.remote.Library
import com.theapache64.stackzy.data.repo.LibrariesRepo
import com.theapache64.stackzy.data.util.calladapter.flow.Resource
import com.toxicbakery.logging.Arbor
import kotlinx.coroutines.flow.collect

suspend fun LibrariesRepo.loadLibs(onLibsLoaded: suspend (List<Library>) -> Unit) {
getRemoteLibraries().collect {
Expand Down

0 comments on commit c7ae0b3

Please sign in to comment.