Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
For #11753 - Update compose to 1.1.0
Browse files Browse the repository at this point in the history
This also required updating kotlin to >= 1.6.10 and room to >= 2.4.0.
  • Loading branch information
Mugurell committed Feb 22, 2022
1 parent 300df48 commit 1a7254e
Show file tree
Hide file tree
Showing 21 changed files with 79 additions and 4 deletions.
8 changes: 4 additions & 4 deletions buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

// Synchronized version numbers for dependencies used by (some) modules
object Versions {
const val kotlin = "1.5.31"
const val kotlin = "1.6.10"
const val coroutines = "1.5.2"

const val junit = "4.12"
Expand Down Expand Up @@ -35,10 +35,10 @@ object Versions {

const val material = "1.2.1"

const val compose_version = "1.0.5"
const val compose_version = "1.1.0"

object AndroidX {
const val activityCompose = "1.4.0"
const val activityCompose = "1.5.0"
const val annotation = "1.1.0"
const val appcompat = "1.3.0"
const val autofill = "1.1.0"
Expand All @@ -54,7 +54,7 @@ object Versions {
const val test = "1.3.0"
const val test_ext = "1.1.2"
const val espresso = "3.3.0"
const val room = "2.3.0"
const val room = "2.4.1"
const val paging = "2.1.2"
const val palette = "1.0.0"
const val preferences = "1.1.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,9 @@ class GeckoEngineSession(
onLaunchIntentRequest(url = url, appIntent = appIntent)
}
}
else -> {
// no-op
}
}
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ internal fun PopupWindow.displayPopup(currentData: MenuPositioningData) {

is BrowserMenuPlacement.AnchoredToTop.ManualAnchoring,
is BrowserMenuPlacement.AnchoredToBottom.ManualAnchoring -> showAtAnchorLocation(currentData)
else -> {
// no-op
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ internal class LinkingMiddleware(
is EngineAction.UnlinkEngineSessionAction -> {
unlink(context, action)
}
else -> {
// no-op
}
}

next(action)
Expand All @@ -58,6 +61,9 @@ internal class LinkingMiddleware(
engineObserver = link(context, action.engineSession, tab, action.skipLoading)
}
}
else -> {
// no-op
}
}

engineObserver?.let {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ internal class TabsRemovedMiddleware(
is CustomTabListAction.RemoveCustomTabAction -> context.state.findCustomTab(action.tabId)?.let {
onTabsRemoved(context, listOf(it))
}
else -> {
// no-op
}
}

next(action)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ internal class WebExtensionMiddleware : Middleware<BrowserState, BrowserAction>
activeTab?.engineState?.engineSession?.markActiveForWebExtensions(false)
}
}
else -> {
// no-op
}
}

next(action)
Expand All @@ -43,6 +46,9 @@ internal class WebExtensionMiddleware : Middleware<BrowserState, BrowserAction>
is EngineAction.LinkEngineSessionAction -> {
switchActiveStateIfNeeded(context)
}
else -> {
// no-op
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ class ThumbnailsMiddleware(
is TabListAction.RemoveTabsAction -> {
action.tabIds.forEach { thumbnailStorage.deleteThumbnail(it) }
}
else -> {
// no-op
}
}

next(action)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ internal class BrowserGestureDetector(
// The lower the values the higher the sensitivity.
// Values of 0 here would mean all swipe events will be treated as pinch/spread to zoom gestures,
// in our context effectively meaning no scrolling, only zooming.
println("Mugurel: trying to use reflection")
try {
listOf(
javaClass.getDeclaredField("mSpanSlop"),
Expand All @@ -72,6 +73,7 @@ internal class BrowserGestureDetector(
} catch (e: ReflectiveOperationException) {
// Seems like some OEMs made some breaking changes in the framework.
// no-op
println("Mugurel: error: $e")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ class ContainerMiddleware(
is InitAction -> initializeContainers(context.store)
is ContainerAction.AddContainerAction -> addContainer(action)
is ContainerAction.RemoveContainerAction -> removeContainer(context.store, action)
else -> {
// no-op
}
}

next(action)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ class DownloadMiddleware(
return
}
}
else -> {
// no-op
}
}

next(action)
Expand All @@ -84,6 +87,9 @@ class DownloadMiddleware(
}
is DownloadAction.AddDownloadAction -> sendDownloadIntent(action.download)
is DownloadAction.RestoreDownloadStateAction -> sendDownloadIntent(action.download)
else -> {
// no-op
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,9 @@ class PromptFeature private constructor(
it.onDeny()
}
is Dismissible -> it.onDismiss()
else -> {
// no-op
}
}
}
}
Expand Down Expand Up @@ -502,6 +505,9 @@ class PromptFeature private constructor(
}

is Repost -> it.onConfirm()
else -> {
// no-op
}
}
}
}
Expand All @@ -517,6 +523,9 @@ class PromptFeature private constructor(
store.consumePromptFrom(sessionId, promptRequestUID, activePrompt) {
when (it) {
is TimeSelection -> it.onClear()
else -> {
// no-op
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ class PromptMiddleware : Middleware<BrowserState, BrowserAction> {
return
}
}
else -> {
// no-op
}
}

next(action)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ internal class SaveLoginDialogFragment : PromptDialogFragment() {
context?.getString(R.string.mozac_feature_prompt_update_confirmation)
)
}
else -> {
// no-op
}
}
}
validateStateUpdate?.invokeOnCompletion {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ class ReaderViewMiddleware : Middleware<BrowserState, BrowserAction> {
context.dispatch(ContentAction.UpdateUrlAction(tab.id, url))
}
}
else -> {
// no-op
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ class RecentlyClosedMiddleware(
is InitAction -> {
initializeRecentlyClosed(context.store)
}
else -> {
// no-op
}
}

next(action)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ class SearchMiddleware(
is SearchAction.UpdateCustomSearchEngineAction -> saveCustomSearchEngine(action)
is SearchAction.RemoveCustomSearchEngineAction -> removeCustomSearchEngine(action)
is SearchAction.SelectSearchEngineAction -> updateSearchEngineSelection(action)
else -> {
// no-op
}
}

next(action)
Expand All @@ -65,6 +68,9 @@ class SearchMiddleware(
updateHiddenSearchEngines(context.state.search.hiddenSearchEngines)
is SearchAction.AddAdditionalSearchEngineAction, is SearchAction.RemoveAdditionalSearchEngineAction ->
updateAdditionalSearchEngines(context.state.search.additionalSearchEngines)
else -> {
// no-op
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ class LastAccessMiddleware : Middleware<BrowserState, BrowserAction> {
context.dispatchUpdateActionForId(action.sessionId)
}
}
else -> {
// no-op
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,9 @@ class SitePermissionsFeature(
is ContentAudioCapture, is ContentAudioMicrophone -> {
systemPermissions.add(RECORD_AUDIO)
}
else -> {
// no-op
}
}
}
return systemPermissions.all { context.isPermissionGranted((it)) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ internal interface TabCollectionDao {
)
fun getTabCollections(): Flow<List<TabCollectionWithTabs>>

@Transaction
@Query(
"""
SELECT *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ class WindowFeature(
)
windowRequest.start()
}
else -> {
// no-op
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ class LocaleMiddleware(
when (action) {
is LocaleAction.RestoreLocaleStateAction -> restoreLocale(context.store)
is LocaleAction.UpdateLocaleAction -> updateLocale(action.locale)
else -> {
// no-op
}
}

next(action)
Expand Down

0 comments on commit 1a7254e

Please sign in to comment.