Skip to content

Add mobile sync session wiring#3574

Open
AhmedNMahran wants to merge 2 commits intoquran:mainfrom
AhmedNMahran:feature/wire-mobile-sync-dependency
Open

Add mobile sync session wiring#3574
AhmedNMahran wants to merge 2 commits intoquran:mainfrom
AhmedNMahran:feature/wire-mobile-sync-dependency

Conversation

@AhmedNMahran
Copy link

Summary

  • add the mobile-sync dependency through the version catalog
  • wire mobile-sync into common:bookmark
  • add a shared MobileSyncSession wrapper around SharedDependencyGraph

Notes

  • this PR only adds infrastructure wiring
  • no bookmark migration, auth UI, login flow, or sync triggering is included yet
  • follow-up PRs will build on top of this session wrapper

)
private val driverFactory = DriverFactory(context = applicationContext)

private val graph by lazy { SharedDependencyGraph.init(driverFactory, environment) }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to call the one that takes in the AuthEnvironment otherwise we always get the default which is always production because:

return if (BuildKonfig.IS_DEBUG) AuthEnvironment.PRELIVE else AuthEnvironment.PRODUCTION

and because we publish release artifacts as we should do.

val syncService: SyncService
get() = graph.syncService

private fun endpoint(context: Context): String {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for now, instead of using the debuggable flag, let's use the package name - if it ends with .debug use prelive otherwise production - in the future we should probably put this behind an interface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants