1
0
Fork 0

Synced Tabs: make sure to stop 'loading' when we encounter an error

master
Grisha Kruglov 2020-07-10 17:41:45 -07:00 committed by Grisha Kruglov
parent c265a7089a
commit 31248b835c
1 changed files with 3 additions and 0 deletions

View File

@ -34,6 +34,9 @@ class SyncedTabsLayout @JvmOverloads constructor(
}
override fun onError(error: SyncedTabsView.ErrorType) {
// We may still be displaying a "loading" spinner, hide it.
stopLoading()
val stringResId = when (error) {
SyncedTabsView.ErrorType.MULTIPLE_DEVICES_UNAVAILABLE -> R.string.synced_tabs_connect_another_device
SyncedTabsView.ErrorType.SYNC_ENGINE_UNAVAILABLE -> R.string.synced_tabs_enable_tab_syncing