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.TextOverflow
import androidx.compose.ui.unit.dp
import com.google.accompanist.pager.ExperimentalPagerApi
@OptIn(ExperimentalPagerApi::class, ExperimentalMaterial3Api::class)
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun RadioDialog(
modifier: Modifier = Modifier,

View File

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

View File

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

View File

@ -23,7 +23,6 @@ import me.ash.reader.data.repository.RssRepository
import javax.inject.Inject
@OptIn(
ExperimentalPagerApi::class,
ExperimentalMaterialApi::class
)
@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.showToast
@OptIn(ExperimentalPagerApi::class)
@Composable
fun AllAllowNotificationDialog(
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.showToast
@OptIn(ExperimentalPagerApi::class)
@Composable
fun AllMoveToGroupDialog(
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.showToast
@OptIn(ExperimentalPagerApi::class)
@Composable
fun AllParseFullContentDialog(
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.showToast
@OptIn(ExperimentalPagerApi::class)
@Composable
fun ClearGroupDialog(
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.showToast
@OptIn(ExperimentalPagerApi::class)
@Composable
fun DeleteGroupDialog(
modifier: Modifier = Modifier,

View File

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

View File

@ -23,7 +23,6 @@ import me.ash.reader.ui.ext.formatUrl
import java.io.InputStream
import javax.inject.Inject
@OptIn(ExperimentalPagerApi::class)
@HiltViewModel
class SubscribeViewModel @Inject constructor(
private val opmlRepository: OpmlRepository,
@ -245,7 +244,6 @@ class SubscribeViewModel @Inject constructor(
}
}
@OptIn(ExperimentalPagerApi::class)
data class SubscribeViewState(
val visible: Boolean = false,
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.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel
import com.google.accompanist.pager.ExperimentalPagerApi
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.launch
@ -40,7 +39,6 @@ import me.ash.reader.ui.component.Dialog
import me.ash.reader.ui.ext.*
@SuppressLint("FlowOperatorInvokedInComposition")
@OptIn(ExperimentalPagerApi::class)
@Composable
fun UpdateDialog(
updateViewModel: UpdateViewModel = hiltViewModel(),