Skip to content

Commit

Permalink
chore: replace deprecated divider and optimize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Bnyro committed Aug 10, 2024
1 parent 7dbfbc3 commit 107e3ff
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.bnyro.clock

import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Assert.*
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.selection.toggleable
import androidx.compose.material3.Divider
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
Expand Down Expand Up @@ -67,7 +67,7 @@ fun SwitchWithDivider(
)
}
}
Divider(
HorizontalDivider(
modifier = Modifier
.height(32.dp)
.padding(horizontal = 8.dp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material.icons.filled.History
import androidx.compose.material.icons.filled.OpenInNew
import androidx.compose.material3.Divider
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.LargeTopAppBar
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
Expand All @@ -21,13 +21,11 @@ import androidx.compose.material3.rememberTopAppBarState
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.nestedscroll.nestedScroll
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalUriHandler
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.bnyro.clock.BuildConfig
import com.bnyro.clock.R
import com.bnyro.clock.navigation.HomeRoutes
import com.bnyro.clock.navigation.homeRoutes
import com.bnyro.clock.presentation.components.ClickableIcon
import com.bnyro.clock.presentation.screens.settings.components.ButtonGroupPref
Expand Down Expand Up @@ -109,7 +107,7 @@ fun SettingsScreen(
}
)
}
Divider(
HorizontalDivider(
modifier = Modifier.padding(top = 12.dp, bottom = 8.dp),
color = MaterialTheme.colorScheme.surfaceVariant
)
Expand Down Expand Up @@ -142,7 +140,7 @@ fun SettingsScreen(
title = stringResource(R.string.show_timer_quick_selection),
defaultValue = true
)
Divider(
HorizontalDivider(
modifier = Modifier.padding(top = 12.dp, bottom = 8.dp),
color = MaterialTheme.colorScheme.surfaceVariant
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import androidx.compose.material.icons.filled.PlayArrow
import androidx.compose.material.icons.filled.Stop
import androidx.compose.material.icons.filled.Timer
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.Divider
import androidx.compose.material3.FloatingActionButton
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.LargeFloatingActionButton
import androidx.compose.material3.MaterialTheme
Expand Down Expand Up @@ -236,7 +236,7 @@ private fun LapTable(
style = MaterialTheme.typography.titleMedium
)
}
Divider()
HorizontalDivider()
}
}
itemsIndexed(stopwatchModel.rememberedTimeStamps) { index, time ->
Expand Down
2 changes: 1 addition & 1 deletion app/src/test/java/com/bnyro/clock/ExampleUnitTest.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.bnyro.clock

import org.junit.Assert.*
import org.junit.Assert.assertEquals
import org.junit.Test

/**
Expand Down

0 comments on commit 107e3ff

Please sign in to comment.