Skip to content

Commit

Permalink
Code cleanup after inspection
Browse files Browse the repository at this point in the history
  • Loading branch information
rozPierog committed Apr 26, 2024
1 parent c5a464c commit 522e100
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 25 deletions.
1 change: 0 additions & 1 deletion app/src/full/java/com/omelan/cofi/utils/InstantUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package com.omelan.cofi.utils
import android.app.Activity
import android.content.Context

@Suppress("unused", "unused")
object InstantUtils {
fun isInstantApp(@Suppress("UNUSED_PARAMETER") context: Context) = false

Expand Down
2 changes: 1 addition & 1 deletion app/src/full/java/com/omelan/cofi/utils/WearUtils.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@file:Suppress("EmptyMethod", "SameReturnValue", "UNUSED_PARAMETER", "unused")
@file:Suppress("EmptyMethod", "SameReturnValue", "UNUSED_PARAMETER")

package com.omelan.cofi.utils

Expand Down
3 changes: 0 additions & 3 deletions app/src/main/java/com/omelan/cofi/components/RecipeInfo.kt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
@file:OptIn(ExperimentalFoundationApi::class)

package com.omelan.cofi.components

import androidx.compose.animation.*
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyRow
import androidx.compose.material3.HorizontalDivider
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/java/com/omelan/cofi/components/RecipeItem.kt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
@file:OptIn(ExperimentalFoundationApi::class)

package com.omelan.cofi.components

import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.grid.GridCells
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/com/omelan/cofi/pages/RecipeEdit.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@file:OptIn(
ExperimentalMaterial3Api::class,
ExperimentalMaterial3WindowSizeClassApi::class,
ExperimentalComposeUiApi::class,
ExperimentalFoundationApi::class,
ExperimentalLayoutApi::class,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
@file:OptIn(ExperimentalMaterial3WindowSizeClassApi::class, ExperimentalFoundationApi::class)
@file:OptIn(ExperimentalMaterial3WindowSizeClassApi::class)

package com.omelan.cofi.pages.details

import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalLifecycleOwner
import androidx.compose.ui.platform.LocalUriHandler
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.LocalLifecycleOwner
import com.omelan.cofi.BuildConfig
import com.omelan.cofi.R
import com.omelan.cofi.components.RecipeListInfoBox
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.nestedscroll.nestedScroll
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalLifecycleOwner
import androidx.compose.ui.platform.LocalUriHandler
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.LocalLifecycleOwner
import com.omelan.cofi.R
import com.omelan.cofi.components.PiPAwareAppBar
import com.omelan.cofi.components.createAppBarBehavior
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import androidx.compose.ui.text.style.TextDecoration
import java.util.regex.Matcher
import java.util.regex.Pattern

const val URL_ANNOTATION = "URL"

fun linkSpanStyle(color: Color) = SpanStyle(
color = color,
textDecoration = TextDecoration.Underline,
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/omelan/cofi/utils/FocusUtils.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@file:Suppress("UnusedReceiverParameter", "UnusedReceiverParameter")
@file:Suppress("UnusedReceiverParameter")

package com.omelan.cofi.utils

Expand Down
2 changes: 1 addition & 1 deletion cofi-share/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ dependencies {
implementation 'androidx.test:core-ktx:1.5.0'
implementation "androidx.compose.ui:ui"
implementation "androidx.compose.foundation:foundation"
implementation "androidx.compose.material:material"
implementation "androidx.compose.material3:material3"
api "androidx.datastore:datastore-preferences:1.1.0"

//Room
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material.Text
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
@file:OptIn(ExperimentalWearMaterialApi::class, ExperimentalAnimationApi::class)
@file:OptIn(ExperimentalWearMaterialApi::class)

package com.omelan.cofi.wearos.presentation.components

import androidx.annotation.DrawableRes
import androidx.compose.animation.*
import androidx.compose.animation.AnimatedContent
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.togetherWith
import androidx.compose.foundation.layout.*
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
Expand Down Expand Up @@ -64,7 +67,9 @@ fun RecipeListItem(modifier: Modifier = Modifier, recipe: Recipe?, onClick: () -
}
AnimatedContent(targetState = recipe, transitionSpec = {
fadeIn() togetherWith fadeOut()
}) {
},
label = "RecipeListItemAnimation"
) {
if (it != null) {
RecipeListItemRaw(
onClick = onClick,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@file:OptIn(ExperimentalAnimationApi::class)

package com.omelan.cofi.wearos.presentation.pages.details

import androidx.annotation.DrawableRes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@file:OptIn(ExperimentalAnimationApi::class)

package com.omelan.cofi.wearos.presentation.pages.details

import android.view.KeyEvent
Expand Down

0 comments on commit 522e100

Please sign in to comment.