Fix some bug and update libs

This commit is contained in:
tom79 2019-08-13 18:41:37 +02:00
parent e9e2b16b9e
commit 0229000837
3 changed files with 12 additions and 10 deletions

View File

@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.0"
buildToolsVersion "29.0.2"
defaultConfig {
minSdkVersion 18
targetSdkVersion 29
@ -54,7 +54,7 @@ allprojects {
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
}
ext.supportLibraryVersion = '29.0.0'
ext.supportLibraryVersion = '29.0.2'
ext.glideLibraryVersion = '4.9.0'
ext.conscryptLibraryVersion = '2.1.0'
ext.evernoteLibraryVersion = '1.3.0-rc1'

View File

@ -3653,12 +3653,12 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
int width = resource.getWidth();
int height = resource.getHeight();
if (height < Helper.convertDpToPixel(200, context)) {
/*if (height < Helper.convertDpToPixel(200, context)) {
double ratio = ((double) Helper.convertDpToPixel(200, context) / (double) height);
width = (int) (ratio * width);
height = (int) Helper.convertDpToPixel(200, context);
resource = Bitmap.createScaledBitmap(resource, width, height, false);
}
}*/
imageView.setImageBitmap(resource);
status.setMedia_height(container.getHeight());
}
@ -3676,12 +3676,12 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
int width = resource.getWidth();
int height = resource.getHeight();
if (height < Helper.convertDpToPixel(200, context)) {
/*if (height < Helper.convertDpToPixel(200, context)) {
double ratio = ((double) Helper.convertDpToPixel(200, context) / (double) height);
width = (int) (ratio * width);
height = (int) Helper.convertDpToPixel(200, context);
resource = Bitmap.createScaledBitmap(resource, width, height, false);
}
}*/
imageView.setImageBitmap(resource);
}
});

View File

@ -120,10 +120,12 @@ public class BackupStatusesSyncJob extends Job {
for(Account account: accounts) {
boolean autobackup = sharedpreferences.getBoolean(Helper.SET_AUTO_BACKUP_STATUSES + account.getId() + account.getInstance(), false);
if( autobackup) {
Intent backupIntent = new Intent(getContext(), BackupStatusInDataBaseService.class);
backupIntent.putExtra("userid", account.getId());
backupIntent.putExtra("instance", account.getInstance());
getContext().startService(backupIntent);
try {
Intent backupIntent = new Intent(getContext(), BackupStatusInDataBaseService.class);
backupIntent.putExtra("userid", account.getId());
backupIntent.putExtra("instance", account.getInstance());
getContext().startService(backupIntent);
}catch (Exception ignored){}
}
}
}