Animate gif avatars (#1279)

* animate gif avatars

* add setting to enable avatar animation

* cleanup code
This commit is contained in:
Konrad Pozniak 2019-05-26 08:46:08 +02:00 committed by GitHub
commit 83696b5c7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 381 additions and 547 deletions

View file

@ -230,6 +230,10 @@ public class NotificationsFragment extends SFragment implements
adapter.setMediaPreviewEnabled(mediaPreviewEnabled);
boolean useAbsoluteTime = preferences.getBoolean("absoluteTimeView", false);
adapter.setUseAbsoluteTime(useAbsoluteTime);
boolean showBotOverlay = preferences.getBoolean("showBotOverlay", true);
adapter.setShowBotOverlay(showBotOverlay);
boolean animateAvatar = preferences.getBoolean("animateGifAvatars", false);
adapter.setAnimateAvatar(animateAvatar);
recyclerView.setAdapter(adapter);
topLoading = false;
@ -734,7 +738,7 @@ public class NotificationsFragment extends SFragment implements
Log.w(TAG, "Didn't find a notification for ID: " + notificationId);
}
public void onPreferenceChanged(String key) {
private void onPreferenceChanged(String key) {
switch (key) {
case "fabHide": {
hideFab = PreferenceManager.getDefaultSharedPreferences(getContext()).getBoolean("fabHide", false);
@ -746,7 +750,6 @@ public class NotificationsFragment extends SFragment implements
adapter.setMediaPreviewEnabled(enabled);
fullyRefresh();
}
break;
}
}
}