|
@ -1,5 +1,7 @@ |
|
|
package gr.thmmy.mthmmy.activities.profile; |
|
|
package gr.thmmy.mthmmy.activities.profile; |
|
|
|
|
|
|
|
|
|
|
|
import android.app.Activity; |
|
|
|
|
|
import android.content.Context; |
|
|
import android.content.Intent; |
|
|
import android.content.Intent; |
|
|
import android.graphics.Color; |
|
|
import android.graphics.Color; |
|
|
import android.graphics.Typeface; |
|
|
import android.graphics.Typeface; |
|
@ -57,6 +59,7 @@ import timber.log.Timber; |
|
|
import static gr.thmmy.mthmmy.activities.topic.TopicActivity.BUNDLE_TOPIC_TITLE; |
|
|
import static gr.thmmy.mthmmy.activities.topic.TopicActivity.BUNDLE_TOPIC_TITLE; |
|
|
import static gr.thmmy.mthmmy.activities.topic.TopicActivity.BUNDLE_TOPIC_URL; |
|
|
import static gr.thmmy.mthmmy.activities.topic.TopicActivity.BUNDLE_TOPIC_URL; |
|
|
import static gr.thmmy.mthmmy.utils.parsing.ParseHelpers.emojiTagToHtml; |
|
|
import static gr.thmmy.mthmmy.utils.parsing.ParseHelpers.emojiTagToHtml; |
|
|
|
|
|
import static gr.thmmy.mthmmy.utils.ui.GlideUtils.isValidContextForGlide; |
|
|
import static gr.thmmy.mthmmy.utils.ui.PhotoViewUtils.displayPhotoViewImage; |
|
|
import static gr.thmmy.mthmmy.utils.ui.PhotoViewUtils.displayPhotoViewImage; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -222,6 +225,7 @@ public class ProfileActivity extends BaseActivity implements LatestPostsFragment |
|
|
avatarView.setOnClickListener(v -> displayPhotoViewImage(ProfileActivity.this, avatarUrl)); |
|
|
avatarView.setOnClickListener(v -> displayPhotoViewImage(ProfileActivity.this, avatarUrl)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(isValidContextForGlide(this)){ |
|
|
Glide.with(this) |
|
|
Glide.with(this) |
|
|
.load(avatarUri) |
|
|
.load(avatarUri) |
|
|
.circleCrop() |
|
|
.circleCrop() |
|
@ -229,6 +233,9 @@ public class ProfileActivity extends BaseActivity implements LatestPostsFragment |
|
|
.placeholder(R.drawable.ic_default_user_avatar) |
|
|
.placeholder(R.drawable.ic_default_user_avatar) |
|
|
.into(avatarView); |
|
|
.into(avatarView); |
|
|
} |
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
Timber.d("Will not load Glide image (invalid context)"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* An {@link AsyncTask} that handles asynchronous fetching of a profile page and parsing this |
|
|
* An {@link AsyncTask} that handles asynchronous fetching of a profile page and parsing this |
|
|