Browse Source

Fix image scaling

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic 6 years ago
parent
commit
c3ce9d8b5f

+ 0 - 1
app/src/main/java/com/nextcloud/talk/application/NextcloudTalkApplication.java

@@ -144,7 +144,6 @@ public class NextcloudTalkApplication extends MultiDexApplication implements Lif
                 .build();
                 .build();
 
 
         Fresco.initialize(this, imagePipelineConfig);
         Fresco.initialize(this, imagePipelineConfig);
-        FLog.setMinimumLoggingLevel(FLog.VERBOSE);
 
 
         new ClosedInterfaceImpl().providerInstallerInstallIfNeededAsync();
         new ClosedInterfaceImpl().providerInstallerInstallIfNeededAsync();
         DeviceUtils.ignoreSpecialBatteryFeatures();
         DeviceUtils.ignoreSpecialBatteryFeatures();

+ 1 - 1
app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.java

@@ -93,7 +93,7 @@ public class DisplayUtils {
 
 
     private static void updateViewSize(@Nullable ImageInfo imageInfo, SimpleDraweeView draweeView) {
     private static void updateViewSize(@Nullable ImageInfo imageInfo, SimpleDraweeView draweeView) {
         if (imageInfo != null) {
         if (imageInfo != null) {
-            draweeView.getLayoutParams().width = imageInfo.getWidth();
+            draweeView.getLayoutParams().width = imageInfo.getWidth() > 480 ? 480 : imageInfo.getWidth();
             draweeView.getLayoutParams().height = ViewGroup.LayoutParams.WRAP_CONTENT;
             draweeView.getLayoutParams().height = ViewGroup.LayoutParams.WRAP_CONTENT;
             draweeView.setAspectRatio((float) imageInfo.getWidth() / imageInfo.getHeight());
             draweeView.setAspectRatio((float) imageInfo.getWidth() / imageInfo.getHeight());
         }
         }