Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unresolved theme attributes exception #1323

Merged
merged 3 commits into from Mar 26, 2024

Conversation

bemusementpark
Copy link
Collaborator

@bemusementpark bemusementpark commented Sep 13, 2023

This PR avoids throwing/logging this exception.

2023-09-13 14:20:42.739  8485-8485  Resources               network.loki.messenger               W  Drawable network.loki.messenger:drawable/avatar_gradient_dark has unresolved theme attributes! Consider using Resources.getDrawable(int, Theme) or Context.getDrawable(int).
                                                                                                    java.lang.RuntimeException
                                                                                                    	at android.content.res.Resources.getDrawable(Resources.java:908)
                                                                                                    	at org.session.libsession.avatars.ResourceContactPhoto.asDrawable(ResourceContactPhoto.java:42)
                                                                                                    	at org.thoughtcrime.securesms.components.ProfilePictureView$unknownRecipientDrawable$2.invoke(ProfilePictureView.kt:38)
                                                                                                    	at org.thoughtcrime.securesms.components.ProfilePictureView$unknownRecipientDrawable$2.invoke(ProfilePictureView.kt:37)
                                                                                                    	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
                                                                                                    	at org.thoughtcrime.securesms.components.ProfilePictureView.getUnknownRecipientDrawable(ProfilePictureView.kt:37)
                                                                                                    	at org.thoughtcrime.securesms.components.ProfilePictureView.setProfilePictureIfNeeded(ProfilePictureView.kt:144)
                                                                                                    	at org.thoughtcrime.securesms.components.ProfilePictureView.update(ProfilePictureView.kt:102)
                                                                                                    	at org.thoughtcrime.securesms.components.ProfilePictureView.update(ProfilePictureView.kt:86)
                                                                                                    	at org.thoughtcrime.securesms.home.ConversationView.bind(ConversationView.kt:127)
                                                                                                    	at org.thoughtcrime.securesms.home.HomeAdapter.onBindViewHolder(HomeAdapter.kt:100)
                                                                                                    	at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7254)

@bemusementpark bemusementpark changed the base branch from master to dev March 25, 2024 02:56
@bemusementpark bemusementpark merged commit f26c971 into oxen-io:dev Mar 26, 2024
1 check passed
@bemusementpark bemusementpark deleted the fix-attr-ex branch March 26, 2024 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants