This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt update | |
apt install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" | |
apt update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal class AuthRefreshFeature( | |
private val localAuthDataSource: LocalAuthDataSource, | |
private val refreshTokenDataSource: KtorRefreshTokenDataSource, | |
private val localAuthErrorDataSource: LocalAuthErrorDataSource, | |
private val json: Json | |
) { | |
class Config( | |
var localAuthDataSource: LocalAuthDataSource? = null, | |
var refreshTokenDataSource: KtorRefreshTokenDataSource? = null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun DesktopWebView() { | |
val finishListener = object : PlatformImpl.FinishListener { | |
override fun idle(implicitExit: Boolean) {} | |
override fun exitCalled() {} | |
} | |
PlatformImpl.addListener(finishListener) | |
println("Desktop Web View start") | |
Window( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DesktopWebView { | |
public static JFrame renderWebView(String url) { | |
JFrame frame = new JFrame(); | |
final JFXPanel fxPanel = new JFXPanel(); | |
frame.add(fxPanel); | |
frame.setSize(300, 200); | |
frame.setVisible(true); | |
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ExampleView: View { | |
let viewModel: AuthViewModel = AuthViewModel() | |
var body: some View { | |
ObservingView(statePublisher: asPublisher(viewModel.viewStates()), | |
actionPublisher: asPublisher(viewModel.viewActions()), | |
content: { state, action in | |
// your view here | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun TagHost( | |
modifier: Modifier = Modifier, | |
verticalPadding: Dp = 24.dp, | |
content: @Composable () -> Unit | |
) { | |
Layout( | |
modifier = modifier, | |
content = content | |
) { measurables, constraints -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id("com.android.application") | |
kotlin("android") | |
kotlin("kapt") | |
id("org.jetbrains.compose") | |
} | |
android { | |
compileSdkVersion(30) | |
buildToolsVersion("30.0.2") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ru.leroymerlin.library_sdk.screens.product_details | |
import android.media.Rating | |
import androidx.compose.foundation.ExperimentalFoundationApi | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.layout.* | |
import androidx.compose.foundation.lazy.LazyColumn | |
import androidx.compose.foundation.shape.RoundedCornerShape | |
import androidx.compose.material.* | |
import androidx.compose.runtime.Composable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class GistResponse( | |
val url: String, | |
..., | |
val files: FilesRemote | |
) | |
data class FilesRemote( | |
val filename: FilesFilename | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CatalogVersionRepositoryImpl @Inject constructor( | |
private val catalogVersionRemoteDataSource: CatalogVersionRemoteDataSource, | |
private val catalogVersionLocalDataSource: CatalogVersionLocalDataSource | |
) : CatalogVersionRepository { | |
override fun checkNeedUpdate(): Single<Boolean> { | |
return catalogVersionRemoteDataSource.getCurrentCatalogVersion() | |
.map { remoteCatalogueVersion -> | |
val localCatalogueVersion = catalogVersionLocalDataSource.getCurrentCatalogVersion() | |
val hasActualVersion = localCatalogueVersion == remoteCatalogueVersion |
NewerOlder