Skip to content

Commit 90c129a

Browse files
committed
Detecting app updates
1 parent d475255 commit 90c129a

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

.idea/caches/build_file_checksums.ser

0 Bytes
Binary file not shown.

app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ android {
66
applicationId "ca.pkay.rcloneexplorer"
77
minSdkVersion 21
88
targetSdkVersion 27
9-
versionCode 10
10-
versionName "1.2.1"
9+
versionCode 11
10+
versionName "1.2.2"
1111
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1212
}
1313
buildTypes {

app/src/main/assets/changelog.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
### 1.2.2
2-
* **Update:** rclone binary
2+
* **Update:** Rclone to version 1.41
33
* **New:** App shortcuts
4+
* **Fix:** Color picker not working on sdk 21
5+
* **Fix:** Rclone not getting updated
46

57
***
68

app/src/main/java/ca/pkay/rcloneexplorer/MainActivity.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,13 @@ public void onClick(View v) {
109109
int lastVersionCode = sharedPreferences.getInt(getString(R.string.pref_key_version_code), -1);
110110
int currentVersionCode = BuildConfig.VERSION_CODE;
111111

112-
if (!rclone.isRcloneBinaryCreated() || lastVersionCode != currentVersionCode) {
112+
if (!rclone.isRcloneBinaryCreated()) {
113113
new CreateRcloneBinary().execute();
114+
} else if (lastVersionCode < currentVersionCode) {
115+
new CreateRcloneBinary().execute();
116+
SharedPreferences.Editor editor = sharedPreferences.edit();
117+
editor.putInt(getString(R.string.pref_key_version_code), currentVersionCode);
118+
editor.apply();
114119
} else if (rclone.isConfigEncrypted()) {
115120
askForConfigPassword();
116121
} else if (bundle != null && bundle.containsKey(APP_SHORTCUT_REMOTE_NAME) && bundle.containsKey(APP_SHORTCUT_REMOTE_TYPE)) {

0 commit comments

Comments
 (0)