Remove invalid @OptIn

This commit is contained in:
Ash 2022-05-16 11:04:51 +08:00
parent 962e0ee8dc
commit b010fe940b
14 changed files with 2 additions and 24 deletions

View File

@ -19,9 +19,8 @@ import androidx.compose.ui.draw.clip
import androidx.compose.ui.text.style.BaselineShift import androidx.compose.ui.text.style.BaselineShift
import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.google.accompanist.pager.ExperimentalPagerApi
@OptIn(ExperimentalPagerApi::class, ExperimentalMaterial3Api::class) @OptIn(ExperimentalMaterial3Api::class)
@Composable @Composable
fun RadioDialog( fun RadioDialog(
modifier: Modifier = Modifier, modifier: Modifier = Modifier,

View File

@ -16,7 +16,6 @@ import androidx.compose.ui.window.DialogProperties
import com.google.accompanist.pager.ExperimentalPagerApi import com.google.accompanist.pager.ExperimentalPagerApi
import me.ash.reader.R import me.ash.reader.R
@OptIn(ExperimentalPagerApi::class)
@Composable @Composable
fun TextFieldDialog( fun TextFieldDialog(
modifier: Modifier = Modifier, modifier: Modifier = Modifier,

View File

@ -33,7 +33,6 @@ import androidx.compose.foundation.text.selection.DisableSelection
import androidx.compose.material.Text import androidx.compose.material.Text
import androidx.compose.material3.Surface import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.runtime.ExperimentalComposeApi
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.RectangleShape import androidx.compose.ui.graphics.RectangleShape
@ -48,7 +47,6 @@ import androidx.compose.ui.text.style.BaselineShift
import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.text.style.TextDecoration
import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import coil.annotation.ExperimentalCoilApi
import coil.size.Precision import coil.size.Precision
import coil.size.Size import coil.size.Size
import coil.size.pxOrElse import coil.size.pxOrElse
@ -178,7 +176,6 @@ private fun LazyListScope.formatCodeBlock(
composer.terminateCurrentText() composer.terminateCurrentText()
} }
@OptIn(ExperimentalComposeApi::class, ExperimentalCoilApi::class)
private fun TextComposer.appendTextChildren( private fun TextComposer.appendTextChildren(
nodes: List<Node>, nodes: List<Node>,
preFormatted: Boolean = false, preFormatted: Boolean = false,
@ -646,7 +643,6 @@ private fun TextComposer.appendTextChildren(
} }
} }
@OptIn(ExperimentalStdlibApi::class)
private fun String.asFontFamily(): FontFamily? = when (this.lowercase()) { private fun String.asFontFamily(): FontFamily? = when (this.lowercase()) {
"monospace" -> FontFamily.Monospace "monospace" -> FontFamily.Monospace
"serif" -> FontFamily.Serif "serif" -> FontFamily.Serif

View File

@ -17,7 +17,6 @@ import me.ash.reader.ui.component.Dialog
import me.ash.reader.ui.ext.collectAsStateValue import me.ash.reader.ui.ext.collectAsStateValue
import me.ash.reader.ui.ext.showToast import me.ash.reader.ui.ext.showToast
@OptIn(ExperimentalPagerApi::class)
@Composable @Composable
fun ClearFeedDialog( fun ClearFeedDialog(
modifier: Modifier = Modifier, modifier: Modifier = Modifier,

View File

@ -17,7 +17,6 @@ import me.ash.reader.ui.component.Dialog
import me.ash.reader.ui.ext.collectAsStateValue import me.ash.reader.ui.ext.collectAsStateValue
import me.ash.reader.ui.ext.showToast import me.ash.reader.ui.ext.showToast
@OptIn(ExperimentalPagerApi::class)
@Composable @Composable
fun DeleteFeedDialog( fun DeleteFeedDialog(
modifier: Modifier = Modifier, modifier: Modifier = Modifier,

View File

@ -23,7 +23,6 @@ import me.ash.reader.data.repository.RssRepository
import javax.inject.Inject import javax.inject.Inject
@OptIn( @OptIn(
ExperimentalPagerApi::class,
ExperimentalMaterialApi::class ExperimentalMaterialApi::class
) )
@HiltViewModel @HiltViewModel

View File

@ -17,7 +17,6 @@ import me.ash.reader.ui.component.Dialog
import me.ash.reader.ui.ext.collectAsStateValue import me.ash.reader.ui.ext.collectAsStateValue
import me.ash.reader.ui.ext.showToast import me.ash.reader.ui.ext.showToast
@OptIn(ExperimentalPagerApi::class)
@Composable @Composable
fun AllAllowNotificationDialog( fun AllAllowNotificationDialog(
modifier: Modifier = Modifier, modifier: Modifier = Modifier,

View File

@ -17,7 +17,6 @@ import me.ash.reader.ui.component.Dialog
import me.ash.reader.ui.ext.collectAsStateValue import me.ash.reader.ui.ext.collectAsStateValue
import me.ash.reader.ui.ext.showToast import me.ash.reader.ui.ext.showToast
@OptIn(ExperimentalPagerApi::class)
@Composable @Composable
fun AllMoveToGroupDialog( fun AllMoveToGroupDialog(
modifier: Modifier = Modifier, modifier: Modifier = Modifier,

View File

@ -17,7 +17,6 @@ import me.ash.reader.ui.component.Dialog
import me.ash.reader.ui.ext.collectAsStateValue import me.ash.reader.ui.ext.collectAsStateValue
import me.ash.reader.ui.ext.showToast import me.ash.reader.ui.ext.showToast
@OptIn(ExperimentalPagerApi::class)
@Composable @Composable
fun AllParseFullContentDialog( fun AllParseFullContentDialog(
modifier: Modifier = Modifier, modifier: Modifier = Modifier,

View File

@ -17,7 +17,6 @@ import me.ash.reader.ui.component.Dialog
import me.ash.reader.ui.ext.collectAsStateValue import me.ash.reader.ui.ext.collectAsStateValue
import me.ash.reader.ui.ext.showToast import me.ash.reader.ui.ext.showToast
@OptIn(ExperimentalPagerApi::class)
@Composable @Composable
fun ClearGroupDialog( fun ClearGroupDialog(
modifier: Modifier = Modifier, modifier: Modifier = Modifier,

View File

@ -17,7 +17,6 @@ import me.ash.reader.ui.component.Dialog
import me.ash.reader.ui.ext.collectAsStateValue import me.ash.reader.ui.ext.collectAsStateValue
import me.ash.reader.ui.ext.showToast import me.ash.reader.ui.ext.showToast
@OptIn(ExperimentalPagerApi::class)
@Composable @Composable
fun DeleteGroupDialog( fun DeleteGroupDialog(
modifier: Modifier = Modifier, modifier: Modifier = Modifier,

View File

@ -5,7 +5,6 @@ import androidx.compose.material.ModalBottomSheetState
import androidx.compose.material.ModalBottomSheetValue import androidx.compose.material.ModalBottomSheetValue
import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.google.accompanist.pager.ExperimentalPagerApi
import dagger.hilt.android.lifecycle.HiltViewModel import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
@ -21,10 +20,7 @@ import me.ash.reader.data.module.DispatcherMain
import me.ash.reader.data.repository.RssRepository import me.ash.reader.data.repository.RssRepository
import javax.inject.Inject import javax.inject.Inject
@OptIn( @OptIn(ExperimentalMaterialApi::class)
ExperimentalPagerApi::class,
ExperimentalMaterialApi::class
)
@HiltViewModel @HiltViewModel
class GroupOptionViewModel @Inject constructor( class GroupOptionViewModel @Inject constructor(
private val rssRepository: RssRepository, private val rssRepository: RssRepository,

View File

@ -23,7 +23,6 @@ import me.ash.reader.ui.ext.formatUrl
import java.io.InputStream import java.io.InputStream
import javax.inject.Inject import javax.inject.Inject
@OptIn(ExperimentalPagerApi::class)
@HiltViewModel @HiltViewModel
class SubscribeViewModel @Inject constructor( class SubscribeViewModel @Inject constructor(
private val opmlRepository: OpmlRepository, private val opmlRepository: OpmlRepository,
@ -245,7 +244,6 @@ class SubscribeViewModel @Inject constructor(
} }
} }
@OptIn(ExperimentalPagerApi::class)
data class SubscribeViewState( data class SubscribeViewState(
val visible: Boolean = false, val visible: Boolean = false,
val title: String = "", val title: String = "",

View File

@ -30,7 +30,6 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel import androidx.hilt.navigation.compose.hiltViewModel
import com.google.accompanist.pager.ExperimentalPagerApi
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.map
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
@ -40,7 +39,6 @@ import me.ash.reader.ui.component.Dialog
import me.ash.reader.ui.ext.* import me.ash.reader.ui.ext.*
@SuppressLint("FlowOperatorInvokedInComposition") @SuppressLint("FlowOperatorInvokedInComposition")
@OptIn(ExperimentalPagerApi::class)
@Composable @Composable
fun UpdateDialog( fun UpdateDialog(
updateViewModel: UpdateViewModel = hiltViewModel(), updateViewModel: UpdateViewModel = hiltViewModel(),