1
0
Fork 0

Suppress upcoming deprecation (#6765)

master
Tiger Oakes 2019-11-28 16:17:56 -08:00 committed by GitHub
parent 85111f538a
commit d5e01384d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 20 deletions

View File

@ -177,22 +177,22 @@ class DefaultToolbarMenu(
onItemTapped.invoke(ToolbarMenu.Item.Help)
}
@Suppress("Deprecation")
private val settings = BrowserMenuHighlightableItem(
label = context.getString(R.string.browser_menu_settings),
imageResource = R.drawable.ic_settings,
startImageResource = R.drawable.ic_settings,
iconTintColorResource = if (hasAccountProblem)
R.color.sync_error_text_color else
primaryTextColor(),
textColorResource = if (hasAccountProblem)
R.color.sync_error_text_color else
primaryTextColor(),
highlight = if (hasAccountProblem) {
BrowserMenuHighlightableItem.Highlight(
endImageResource = R.drawable.ic_alert,
backgroundResource = R.drawable.sync_error_background_with_ripple,
colorResource = R.color.sync_error_background_color
)
} else null
highlight = BrowserMenuHighlightableItem.Highlight(
endImageResource = R.drawable.ic_alert,
backgroundResource = R.drawable.sync_error_background_with_ripple,
colorResource = R.color.sync_error_background_color
),
isHighlighted = { hasAccountProblem }
) {
onItemTapped.invoke(ToolbarMenu.Item.Settings)
}

View File

@ -64,26 +64,25 @@ class HomeMenu(
BrowserMenuDivider(),
@Suppress("Deprecation")
BrowserMenuHighlightableItem(
label = context.getString(R.string.browser_menu_settings),
imageResource = R.drawable.ic_settings,
startImageResource = R.drawable.ic_settings,
iconTintColorResource =
if (hasAccountProblem) R.color.sync_error_text_color else primaryTextColor,
if (hasAccountProblem) R.color.sync_error_text_color else primaryTextColor,
textColorResource =
if (hasAccountProblem) R.color.sync_error_text_color else primaryTextColor,
highlight = if (hasAccountProblem) {
BrowserMenuHighlightableItem.Highlight(
endImageResource = R.drawable.ic_alert,
backgroundResource = R.drawable.sync_error_background_with_ripple,
colorResource = R.color.sync_error_background_color
)
} else null
if (hasAccountProblem) R.color.sync_error_text_color else primaryTextColor,
highlight = BrowserMenuHighlightableItem.Highlight(
endImageResource = R.drawable.ic_alert,
backgroundResource = R.drawable.sync_error_background_with_ripple,
colorResource = R.color.sync_error_background_color
),
isHighlighted = { hasAccountProblem }
) {
onItemTapped.invoke(Item.Settings)
},
@Suppress("Deprecation")
BrowserMenuHighlightableItem(
context.getString(R.string.browser_menu_whats_new),
R.drawable.ic_whats_new,