Compare commits
5 commits
d4cc355cc6
...
1ae6f25a45
Author | SHA1 | Date | |
---|---|---|---|
1ae6f25a45 | |||
64ab2bf345 | |||
2f5a58c101 | |||
50c181004f | |||
e7f0603446 |
8 changed files with 17 additions and 15 deletions
|
@ -37,11 +37,11 @@ android {
|
|||
}
|
||||
compileSdk = libs.versions.maxSdk.get().toInt()
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
jvmTarget = "11"
|
||||
}
|
||||
defaultConfig {
|
||||
applicationId = "com.wbrawner.simplemarkdown"
|
||||
|
|
|
@ -4,7 +4,6 @@ import android.content.Intent
|
|||
import android.net.Uri
|
||||
import androidx.activity.compose.rememberLauncherForActivityResult
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
|
@ -327,7 +326,7 @@ private fun MainScreen(
|
|||
}
|
||||
|
||||
@Composable
|
||||
@OptIn(ExperimentalFoundationApi::class, ExperimentalMaterial3Api::class)
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
private fun TabbedMarkdownEditor(
|
||||
initialMarkdown: String,
|
||||
markdown: String,
|
||||
|
@ -349,7 +348,7 @@ private fun TabbedMarkdownEditor(
|
|||
}
|
||||
HorizontalPager(
|
||||
modifier = Modifier.fillMaxSize(1f), state = pagerState,
|
||||
beyondBoundsPageCount = 1,
|
||||
beyondViewportPageCount = 1,
|
||||
userScrollEnabled = !lockSwiping
|
||||
) { page ->
|
||||
val keyboardController = LocalSoftwareKeyboardController.current
|
||||
|
|
|
@ -47,6 +47,7 @@ class AndroidPreferenceHelper(context: Context, private val coroutineScope: Coro
|
|||
}
|
||||
}
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
override fun <T> observe(preference: Preference): StateFlow<T> = states[preference]!!.asStateFlow() as StateFlow<T>
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ class FakePreferenceHelper: PreferenceHelper {
|
|||
preferences[preference] = value
|
||||
}
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
override fun <T> observe(preference: Preference): StateFlow<T> =
|
||||
preferenceFlow(preference) as StateFlow<T>
|
||||
}
|
|
@ -23,6 +23,7 @@ import timber.log.Timber
|
|||
import java.io.File
|
||||
import java.net.URI
|
||||
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
class MarkdownViewModelTest {
|
||||
private lateinit var fileHelper: FakeFileHelper
|
||||
private lateinit var preferenceHelper: FakePreferenceHelper
|
||||
|
|
|
@ -41,11 +41,11 @@ android {
|
|||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
jvmTarget = "11"
|
||||
}
|
||||
lint {
|
||||
disable += listOf("AndroidGradlePluginVersion", "GradleDependency")
|
||||
|
|
|
@ -27,11 +27,11 @@ android {
|
|||
compose = true
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
jvmTarget = "11"
|
||||
}
|
||||
lint {
|
||||
disable += listOf("AndroidGradlePluginVersion", "GradleDependency")
|
||||
|
|
|
@ -24,14 +24,14 @@ android {
|
|||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
buildFeatures {
|
||||
compose = true
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
jvmTarget = "11"
|
||||
}
|
||||
lint {
|
||||
disable += listOf("AndroidGradlePluginVersion", "GradleDependency")
|
||||
|
|
Loading…
Reference in a new issue