From 5865dbe54a1c2613e560b05f1d95a819e4585420 Mon Sep 17 00:00:00 2001 From: Nazar-Kutz Date: Tue, 11 Aug 2020 13:18:28 +0300 Subject: [PATCH] small refactoring --- OsmAnd/src/net/osmand/plus/UiUtilities.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/UiUtilities.java b/OsmAnd/src/net/osmand/plus/UiUtilities.java index e671509c2a..445ea97b9c 100644 --- a/OsmAnd/src/net/osmand/plus/UiUtilities.java +++ b/OsmAnd/src/net/osmand/plus/UiUtilities.java @@ -514,14 +514,13 @@ public class UiUtilities { public static void setupToolbarOverflowIcon(Toolbar toolbar, @DrawableRes int iconId, @ColorRes int colorId) { Context ctx = toolbar.getContext(); if (ctx != null) { - return; - } - Drawable icon = ContextCompat.getDrawable(ctx, iconId); - toolbar.setOverflowIcon(icon); - if (icon != null) { - int color = ContextCompat.getColor(ctx, colorId); - DrawableCompat.setTint(icon.mutate(), color); + Drawable icon = ContextCompat.getDrawable(ctx, iconId); toolbar.setOverflowIcon(icon); + if (icon != null) { + int color = ContextCompat.getColor(ctx, colorId); + DrawableCompat.setTint(icon.mutate(), color); + toolbar.setOverflowIcon(icon); + } } }