Skip to content

Commit

Permalink
Version 3.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
suragch committed Sep 11, 2021
1 parent 485a099 commit e227efa
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 32 deletions.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

14 changes: 12 additions & 2 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "net.studymongolian.chimee"
minSdkVersion 14
targetSdkVersion 30
versionCode 32
versionName "3.3.0"
versionCode 33
versionName "3.3.1"
}

buildTypes {
Expand All @@ -25,6 +25,6 @@ dependencies {
testImplementation 'junit:junit:4.13.1'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
implementation 'net.studymongolian:mongol-library:2.1.0'
}
Binary file removed app/release/app-release.apk
Binary file not shown.
4 changes: 2 additions & 2 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
{
"type": "SINGLE",
"filters": [],
"versionCode": 32,
"versionName": "3.3.0",
"versionCode": 33,
"versionName": "3.3.1",
"outputFile": "app-release.apk"
}
]
Expand Down
20 changes: 18 additions & 2 deletions app/src/main/java/net/studymongolian/chimee/FileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
Expand Down Expand Up @@ -344,8 +345,23 @@ private static boolean saveBitmapToCacheDir(Context context, Bitmap bitmap) {
File cachePath = new File(context.getCacheDir(), TEMP_CACHE_SUBDIR);
//noinspection ResultOfMethodCallIgnored
cachePath.mkdirs();
FileOutputStream stream =
new FileOutputStream(cachePath + File.separator + TEMP_CACHE_FILENAME);
String filename = cachePath + File.separator + TEMP_CACHE_FILENAME;

// Delete the old file.
// Some users complain of the previous message getting sent. At least in one case this
// apparently happened when the user's storage was full. Hopefully deleting the old
// message will at least prevent resending an old image.
File oldFile = new File(filename);
if (oldFile.exists()) {
boolean successfullyDeleted = oldFile.delete();
if (!successfullyDeleted) {
Log.e("Chimee", "The old message image existed but couldn't be deleted.");
return false;
}
}

// Save new file
FileOutputStream stream = new FileOutputStream(filename);
bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);
stream.close();
} catch (IOException e) {
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/java/net/studymongolian/chimee/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,13 @@ public boolean onMenuItemClick(MongolMenuItem item) {
}
return true;
}


};

private void openColorChooserDialog() {
int bgColor = getInputWindowBackgroundColor();
int fgColor = getSelectedTextColor();
DialogFragment dialog = ColorChooserDialogFragment.newInstance(bgColor, fgColor);
dialog.show(getSupportFragmentManager(), "ColorChooserDialogFragment");

}

private int getInputWindowBackgroundColor() {
Expand Down

0 comments on commit e227efa

Please sign in to comment.