ProfileBottomSheetDialog: fix icon colors and detekt issues

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
Álvaro Brey 2022-09-14 18:26:11 +02:00
parent d0a9fa2c72
commit 131bd9e62c
No known key found for this signature in database
GPG key ID: 2585783189A62105
4 changed files with 2 additions and 14 deletions

View file

@ -438,8 +438,7 @@ public class DialogFragmentIT extends AbstractIT {
ProfileBottomSheetDialog sut = new ProfileBottomSheetDialog(fda,
user,
hoverCard,
fda.themeColorUtils,
fda.themeDrawableUtils);
fda.viewThemeUtils);
fda.runOnUiThread(sut::show);

View file

@ -209,9 +209,6 @@ public abstract class DrawerActivity extends ToolbarActivity
@Inject
ClientFactory clientFactory;
@Inject
ViewThemeUtils viewThemeUtils;
/**
* Initializes the drawer, its content and highlights the menu item with the given id. This method needs to be
* called after the content view has been set.

View file

@ -91,8 +91,6 @@ public class RetrieveHoverCardAsyncTask extends AsyncTask<Void, Void, HoverCard>
new ProfileBottomSheetDialog(activity,
user,
hoverCard,
themeColorUtils,
themeDrawableUtils,
viewThemeUtils)
.show();
} else {

View file

@ -39,8 +39,6 @@ import com.owncloud.android.R
import com.owncloud.android.databinding.ProfileBottomSheetActionBinding
import com.owncloud.android.databinding.ProfileBottomSheetFragmentBinding
import com.owncloud.android.utils.DisplayUtils
import com.owncloud.android.utils.theme.ThemeColorUtils
import com.owncloud.android.utils.theme.ThemeDrawableUtils
import com.owncloud.android.utils.theme.newm3.ViewThemeUtils
/**
@ -50,8 +48,6 @@ class ProfileBottomSheetDialog(
private val fileActivity: FragmentActivity,
private val user: User,
private val hoverCard: HoverCard,
private val themeColorUtils: ThemeColorUtils,
private val themeDrawableUtils: ThemeDrawableUtils,
private val viewThemeUtils: ViewThemeUtils
) : BottomSheetDialog(fileActivity), DisplayUtils.AvatarGenerationListener {
private var _binding: ProfileBottomSheetFragmentBinding? = null
@ -69,8 +65,6 @@ class ProfileBottomSheetDialog(
viewThemeUtils.platform.themeDialog(binding.root)
val primaryColor = themeColorUtils.primaryColor(context, true)
binding.icon.tag = hoverCard.userId
DisplayUtils.setAvatar(
user,
@ -111,7 +105,7 @@ class ProfileBottomSheetDialog(
null
)
)
themeDrawableUtils.tintDrawable(actionBinding.icon.drawable, primaryColor)
viewThemeUtils.platform.tintPrimaryDrawable(context, actionBinding.icon.drawable)
creatorView.setOnClickListener { v: View? ->
send(hoverCard.userId, action)