mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +02:00
Some other fixes
This commit is contained in:
parent
6d3148bd51
commit
908d56109c
3 changed files with 13 additions and 9 deletions
|
@ -26,7 +26,8 @@
|
|||
android:configChanges="orientation|screenSize"
|
||||
android:icon="@mipmap/ic_launcher_bubbles"
|
||||
android:label="@string/app_name"
|
||||
android:hardwareAccelerated="true"
|
||||
android:hardwareAccelerated="false"
|
||||
android:largeHeap="true"
|
||||
android:roundIcon="@mipmap/ic_launcher_bubbles_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppThemeDark"
|
||||
|
|
|
@ -1104,14 +1104,17 @@ public class Helper {
|
|||
String targetedUrl = disableGif ? account.mastodon_account.avatar_static : account.mastodon_account.avatar;
|
||||
if (targetedUrl != null && Helper.isValidContextForGlide(context)) {
|
||||
if (disableGif || (!targetedUrl.endsWith(".gif"))) {
|
||||
RequestBuilder<Drawable> requestBuilder = Glide.with(context)
|
||||
.asDrawable()
|
||||
.load(targetedUrl)
|
||||
.thumbnail(0.1f);
|
||||
if (crop) {
|
||||
requestBuilder = requestBuilder.apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(10)));
|
||||
try {
|
||||
RequestBuilder<Drawable> requestBuilder = Glide.with(context)
|
||||
.asDrawable()
|
||||
.load(targetedUrl)
|
||||
.thumbnail(0.1f);
|
||||
if (crop) {
|
||||
requestBuilder = requestBuilder.apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(10)));
|
||||
}
|
||||
requestBuilder.apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(10))).into(view);
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
requestBuilder.apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(10))).into(view);
|
||||
} else {
|
||||
RequestBuilder<GifDrawable> requestBuilder = Glide.with(context)
|
||||
.asGif()
|
||||
|
|
|
@ -103,7 +103,7 @@ class FragmentSettingsCategories : PreferenceFragmentCompat() {
|
|||
}
|
||||
|
||||
val adminPreference = findPreference<Preference>(getString(R.string.pref_category_key_administration))
|
||||
adminPreference?.isVisible = currentAccount.admin
|
||||
adminPreference?.isVisible = currentAccount != null && currentAccount.admin
|
||||
adminPreference?.setOnPreferenceClickListener { false }
|
||||
|
||||
findPreference<Preference>(getString(R.string.pref_category_key_languages))?.setOnPreferenceClickListener {
|
||||
|
|
Loading…
Reference in a new issue