Update HorizontalPager parameters to reflect API changes

This commit is contained in:
William Brawner 2024-10-01 21:16:58 -06:00
parent 12d5fcb834
commit 7f945ba5fe

View file

@ -4,7 +4,6 @@ import android.content.Intent
import android.net.Uri import android.net.Uri
import androidx.activity.compose.rememberLauncherForActivityResult import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
@ -327,7 +326,7 @@ private fun MainScreen(
} }
@Composable @Composable
@OptIn(ExperimentalFoundationApi::class, ExperimentalMaterial3Api::class) @OptIn(ExperimentalMaterial3Api::class)
private fun TabbedMarkdownEditor( private fun TabbedMarkdownEditor(
initialMarkdown: String, initialMarkdown: String,
markdown: String, markdown: String,
@ -349,7 +348,7 @@ private fun TabbedMarkdownEditor(
} }
HorizontalPager( HorizontalPager(
modifier = Modifier.fillMaxSize(1f), state = pagerState, modifier = Modifier.fillMaxSize(1f), state = pagerState,
beyondBoundsPageCount = 1, beyondViewportPageCount = 1,
userScrollEnabled = !lockSwiping userScrollEnabled = !lockSwiping
) { page -> ) { page ->
val keyboardController = LocalSoftwareKeyboardController.current val keyboardController = LocalSoftwareKeyboardController.current