Loading app/src/main/java/app/fedilab/android/BaseMainActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -612,7 +612,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt binding.profilePicture.setOnClickListener(v -> binding.drawerLayout.openDrawer(GravityCompat.START)); Helper.loadPP(binding.profilePicture, currentAccount); headerMainBinding.accountAcc.setText(String.format("%s@%s", currentAccount.mastodon_account.username, currentAccount.instance)); if (currentAccount.mastodon_account.display_name.isEmpty()) { if (currentAccount.mastodon_account.display_name == null || currentAccount.mastodon_account.display_name.isEmpty()) { currentAccount.mastodon_account.display_name = currentAccount.mastodon_account.acct; } headerMainBinding.accountName.setText(currentAccount.mastodon_account.display_name); Loading app/src/main/java/app/fedilab/android/activities/ProfileActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -348,7 +348,7 @@ public class ProfileActivity extends BaseActivity { binding.accountMoved.setText(spannableString, TextView.BufferType.SPANNABLE); binding.accountMoved.setMovementMethod(LinkMovementMethod.getInstance()); } if (account.acct.contains("@")) if (account.acct != null && account.acct.contains("@")) binding.warningMessage.setVisibility(View.VISIBLE); else binding.warningMessage.setVisibility(View.GONE); Loading app/src/main/java/app/fedilab/android/helper/Helper.java +18 −9 Original line number Diff line number Diff line Loading @@ -1032,6 +1032,7 @@ public class Helper { SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context); boolean disableGif = sharedpreferences.getBoolean(context.getString(R.string.SET_DISABLE_GIF), false); String targetedUrl = disableGif ? account.mastodon_account.avatar_static : account.mastodon_account.avatar; if (targetedUrl != null) { if (disableGif || (!targetedUrl.endsWith(".gif"))) { Glide.with(view.getContext()) .asDrawable() Loading @@ -1047,6 +1048,14 @@ public class Helper { .apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(10))) .into(view); } } else { Glide.with(view.getContext()) .asDrawable() .load(R.drawable.ic_person) .thumbnail(0.1f) .apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(10))) .into(view); } } Loading Loading
app/src/main/java/app/fedilab/android/BaseMainActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -612,7 +612,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt binding.profilePicture.setOnClickListener(v -> binding.drawerLayout.openDrawer(GravityCompat.START)); Helper.loadPP(binding.profilePicture, currentAccount); headerMainBinding.accountAcc.setText(String.format("%s@%s", currentAccount.mastodon_account.username, currentAccount.instance)); if (currentAccount.mastodon_account.display_name.isEmpty()) { if (currentAccount.mastodon_account.display_name == null || currentAccount.mastodon_account.display_name.isEmpty()) { currentAccount.mastodon_account.display_name = currentAccount.mastodon_account.acct; } headerMainBinding.accountName.setText(currentAccount.mastodon_account.display_name); Loading
app/src/main/java/app/fedilab/android/activities/ProfileActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -348,7 +348,7 @@ public class ProfileActivity extends BaseActivity { binding.accountMoved.setText(spannableString, TextView.BufferType.SPANNABLE); binding.accountMoved.setMovementMethod(LinkMovementMethod.getInstance()); } if (account.acct.contains("@")) if (account.acct != null && account.acct.contains("@")) binding.warningMessage.setVisibility(View.VISIBLE); else binding.warningMessage.setVisibility(View.GONE); Loading
app/src/main/java/app/fedilab/android/helper/Helper.java +18 −9 Original line number Diff line number Diff line Loading @@ -1032,6 +1032,7 @@ public class Helper { SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context); boolean disableGif = sharedpreferences.getBoolean(context.getString(R.string.SET_DISABLE_GIF), false); String targetedUrl = disableGif ? account.mastodon_account.avatar_static : account.mastodon_account.avatar; if (targetedUrl != null) { if (disableGif || (!targetedUrl.endsWith(".gif"))) { Glide.with(view.getContext()) .asDrawable() Loading @@ -1047,6 +1048,14 @@ public class Helper { .apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(10))) .into(view); } } else { Glide.with(view.getContext()) .asDrawable() .load(R.drawable.ic_person) .thumbnail(0.1f) .apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(10))) .into(view); } } Loading