Skip to content

Commit

Permalink
revert commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Ponchale committed Nov 15, 2024
1 parent 84f5d4d commit b9a812e
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 45 deletions.
1 change: 0 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import static org.gradle.api.tasks.testing.TestResult.ResultType
apply from: 'benchmark.gradle'

android {
compileSdkVersion Config.compileSdkVersion

project.maybeConfigForJetpackBenchmark(it)
if (project.hasProperty("testBuildType")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import androidx.compose.material.Icon
import androidx.compose.material.IconButton
import androidx.compose.material.Text
import androidx.compose.material.rememberDismissState
import androidx.compose.material.ripple
import androidx.compose.material.ripple.rememberRipple
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
Expand Down Expand Up @@ -148,7 +148,7 @@ fun TabGridItem(
Modifier.clickable(
enabled = shouldClickListen,
interactionSource = interactionSource,
indication = ripple(
indication = rememberRipple(
color = clickableColor(),
),
onClick = { onClick(tab) },
Expand All @@ -157,7 +157,7 @@ fun TabGridItem(
Modifier.combinedClickable(
enabled = shouldClickListen,
interactionSource = interactionSource,
indication = ripple(
indication = rememberRipple(
color = clickableColor(),
),
onLongClick = { onLongClick(tab) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import androidx.compose.material.Icon
import androidx.compose.material.IconButton
import androidx.compose.material.Text
import androidx.compose.material.rememberDismissState
import androidx.compose.material.ripple
import androidx.compose.material.ripple.rememberRipple
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
Expand Down Expand Up @@ -114,7 +114,7 @@ fun TabListItem(
Modifier.clickable(
enabled = shouldClickListen,
interactionSource = interactionSource,
indication = ripple(
indication = rememberRipple(
color = clickableColor(),
),
onClick = { onClick(tab) },
Expand All @@ -123,7 +123,7 @@ fun TabListItem(
Modifier.combinedClickable(
enabled = shouldClickListen,
interactionSource = interactionSource,
indication = ripple(
indication = rememberRipple(
color = clickableColor(),
),
onLongClick = { onLongClick(tab) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.Icon
import androidx.compose.material.IconButton
import androidx.compose.material.Text
import androidx.compose.material.ripple
import androidx.compose.material.ripple.rememberRipple
import androidx.compose.runtime.*
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.ui.Alignment
Expand Down Expand Up @@ -86,7 +86,7 @@ fun <T> LibrarySiteItem(
}
},
interactionSource = remember { MutableInteractionSource() },
indication = ripple(color = WaterfoxTheme.colors.textSecondary),
indication = rememberRipple(color = MidoriTheme.colors.textSecondary),
)
.then(modifier),
verticalAlignment = Alignment.CenterVertically,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ fun TabsTray(
HorizontalPager(
modifier = Modifier.fillMaxSize(),
state = pagerState,
beyondViewportPageCount = 2,
beyondBoundsPageCount = 2,
userScrollEnabled = false,
) { position ->
when (Page.positionToPage(position)) {
Expand Down
22 changes: 11 additions & 11 deletions app/src/main/java/org/midorinext/android/tabstray/TabsTrayBanner.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.size
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.Icon
import androidx.compose.material.IconButton
import androidx.compose.material.LocalRippleConfiguration
import androidx.compose.material.RippleConfiguration
import androidx.compose.material.Tab
import androidx.compose.material.TabRow
import androidx.compose.material.Text
import androidx.compose.material.ripple.LocalRippleTheme
import androidx.compose.material.ripple.RippleAlpha
import androidx.compose.material.ripple.RippleTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.getValue
Expand All @@ -42,6 +41,7 @@ import androidx.compose.ui.unit.dp
import mozilla.components.browser.state.state.ContentState
import mozilla.components.browser.state.state.TabSessionState
import mozilla.components.lib.state.ext.observeAsComposableState
import mozilla.components.ui.tabcounter.TabCounter
import org.midorinext.android.R
import org.midorinext.android.compose.Banner
import org.midorinext.android.compose.BottomSheetHandle
Expand Down Expand Up @@ -177,7 +177,6 @@ fun TabsTrayBanner(
}
}

@OptIn(ExperimentalMaterialApi::class)
@Suppress("LongMethod")
@Composable
private fun SingleSelectBanner(
Expand Down Expand Up @@ -209,7 +208,7 @@ private fun SingleSelectBanner(
.height(80.dp),
horizontalArrangement = Arrangement.spacedBy(16.dp),
) {
CompositionLocalProvider(LocalRippleConfiguration provides DisabledRippleConfiguration) {
CompositionLocalProvider(LocalRippleTheme provides DisabledRippleTheme) {
TabRow(
selectedTabIndex = selectedPage.ordinal,
modifier = Modifier.fillMaxWidth(MAX_WIDTH_TAB_ROW_PERCENT),
Expand Down Expand Up @@ -468,12 +467,13 @@ private fun TabsTrayBannerPreviewRoot(
}
}

@OptIn(ExperimentalMaterialApi::class)
private val DisabledRippleConfiguration =
RippleConfiguration(
color = Color.Unspecified,
rippleAlpha = RippleAlpha(0.0f, 0.0f, 0.0f, 0.0f),
)
private object DisabledRippleTheme : RippleTheme {
@Composable
override fun defaultColor() = Color.Unspecified

@Composable
override fun rippleAlpha(): RippleAlpha = RippleAlpha(0.0f, 0.0f, 0.0f, 0.0f)
}

private fun generateFakeTabsList(tabCount: Int = 10, isPrivate: Boolean = false): List<TabSessionState> =
List(tabCount) { index ->
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/AndroidComponents.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

object AndroidComponents {
const val VERSION = "130.0.1"
const val VERSION = "127.0"
}
45 changes: 22 additions & 23 deletions buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,42 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

object Versions {
const val kotlin = "1.9.24"
const val coroutines = "1.8.1"
const val kotlin = "1.9.22"
const val coroutines = "1.7.3"

// These versions are linked: lint should be X+23.Y.Z of gradle_plugin version, according to:
// https://github.com/alexjlockwood/android-lint-checks-demo/blob/0245fc027463137b1b4afb97c5295d60dce998b6/dependencies.gradle#L3
const val android_gradle_plugin = "8.4.0"
const val android_lint_api = "31.4.0"
const val android_gradle_plugin = "8.2.2"
const val android_lint_api = "31.2.2"

const val sentry = "7.9.0"
const val leakcanary = "2.14"
const val sentry = "6.6.0"
const val leakcanary = "2.13"
const val osslicenses_plugin = "0.10.6"
const val detekt = "1.23.4"
const val jna = "5.12.1"

const val androidx_compose = "1.7.1"
const val androidx_compose_paging = "3.3.0"
const val androidx_compose_compiler = "1.5.14"
const val androidx_appcompat = "1.7.0"
const val androidx_benchmark = "1.2.4"
const val androidx_compose = "1.5.4"
const val androidx_compose_paging = "1.0.0-alpha20"
const val androidx_compose_compiler = "1.5.8"
const val androidx_appcompat = "1.6.1"
const val androidx_benchmark = "1.2.2"
const val androidx_biometric = "1.1.0"
const val androidx_coordinator_layout = "1.2.0"
const val androidx_constraint_layout = "2.1.4"
const val androidx_preference = "1.2.1"
const val androidx_coordinator_layout = "1.1.0"
const val androidx_constraint_layout = "2.0.4"
const val androidx_preference = "1.1.1"
const val androidx_legacy = "1.0.0"
const val androidx_annotation = "1.8.0"
const val androidx_lifecycle = "2.8.3"
const val androidx_annotation = "1.5.0"
const val androidx_lifecycle = "2.7.0"
const val androidx_fragment = "1.6.2"
const val androidx_navigation = "2.7.7"
const val androidx_navigation = "2.5.3"
const val androidx_recyclerview = "1.3.2"
const val androidx_core = "1.13.0"
const val androidx_paging = "3.3.0"
const val androidx_core = "1.12.0"
const val androidx_paging = "3.2.1"
const val androidx_transition = "1.4.1"
const val androidx_work = "2.9.0"
const val androidx_datastore = "1.1.1"
const val google_material = "1.9.0"
const val androidx_work = "2.7.1"
const val androidx_datastore = "1.0.0"
const val google_material = "1.2.1"
const val accompanist_drawablepainter = "0.30.1"
const val coil = "2.4.0"

const val mozilla_android_components = AndroidComponents.VERSION

Expand Down

0 comments on commit b9a812e

Please sign in to comment.