1
0
Fork 0

Use Mozilla Android Components 10.0.0

master
Jonathan Almeida 2019-08-21 09:38:37 -04:00 committed by Jonathan Almeida
parent aa4ed36e46
commit 71a2478f4d
3 changed files with 7 additions and 6 deletions

View File

@ -89,7 +89,7 @@ open class HomeActivity : AppCompatActivity(), ShareFragment.TabsSharedCallback
// If we're authenticated, kick-off a sync and a device state refresh. // If we're authenticated, kick-off a sync and a device state refresh.
accountManager.authenticatedAccount()?.let { accountManager.authenticatedAccount()?.let {
accountManager.syncNowAsync(startup = true) accountManager.syncNowAsync(startup = true)
it.deviceConstellation().refreshDeviceStateAsync().await() it.deviceConstellation().pollForEventsAsync().await()
} }
} }
} }

View File

@ -161,11 +161,12 @@ class AccountSettingsFragment : PreferenceFragmentCompat() {
requireComponents.analytics.metrics.track(Event.SyncAccountSyncNow) requireComponents.analytics.metrics.track(Event.SyncAccountSyncNow)
// Trigger a sync. // Trigger a sync.
requireComponents.backgroundServices.accountManager.syncNowAsync().await() requireComponents.backgroundServices.accountManager.syncNowAsync().await()
// Poll for device events. // Poll for device events & update devices.
accountManager.authenticatedAccount() accountManager.authenticatedAccount()
?.deviceConstellation() ?.deviceConstellation()?.run {
?.refreshDeviceStateAsync() refreshDevicesAsync().await()
?.await() pollForEventsAsync().await()
}
} }
} }

View File

@ -34,7 +34,7 @@ object Versions {
const val androidx_work = "2.0.1" const val androidx_work = "2.0.1"
const val google_material = "1.1.0-alpha07" const val google_material = "1.1.0-alpha07"
const val mozilla_android_components = "9.0.0-SNAPSHOT" const val mozilla_android_components = "10.0.0-SNAPSHOT"
// Note that android-components also depends on application-services, // Note that android-components also depends on application-services,
// and in fact is our main source of appservices-related functionality. // and in fact is our main source of appservices-related functionality.
// The version number below tracks the application-services version // The version number below tracks the application-services version