From d5e01384d8cd5ee6e9e6be6cc8968ea6e291ca31 Mon Sep 17 00:00:00 2001 From: Tiger Oakes Date: Thu, 28 Nov 2019 16:17:56 -0800 Subject: [PATCH] Suppress upcoming deprecation (#6765) --- .../components/toolbar/DefaultToolbarMenu.kt | 16 ++++++------- .../java/org/mozilla/fenix/home/HomeMenu.kt | 23 +++++++++---------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt b/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt index 8e98c7130..860ef743f 100644 --- a/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt +++ b/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt @@ -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) } diff --git a/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt b/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt index 15fa765a3..d82ee45f1 100644 --- a/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt +++ b/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt @@ -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,