From bff2af7bd938ae12d2250d11a19778d60f571016 Mon Sep 17 00:00:00 2001 From: stom79 Date: Wed, 15 Nov 2017 14:14:41 +0100 Subject: [PATCH] Prepares release 1.6.0-beta-2 --- .gitignore | 1 + app/build.gradle | 4 ++-- .../mastodon/activities/TootActivity.java | 18 ++++++++++-------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 7a30bb9f0..7eabbbe89 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /build /captures .externalNativeBuild +/crowdin.properties diff --git a/app/build.gradle b/app/build.gradle index bc23d9d8e..3f5dca44a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "fr.gouv.etalab.mastodon" minSdkVersion 15 targetSdkVersion 27 - versionCode 70 - versionName "1.6.0-beta-1" + versionCode 71 + versionName "1.6.0-beta-2" } flavorDimensions "default" buildTypes { diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/activities/TootActivity.java b/app/src/main/java/fr/gouv/etalab/mastodon/activities/TootActivity.java index cf4eb715b..d8ae7f7ee 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/activities/TootActivity.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/activities/TootActivity.java @@ -930,7 +930,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc } return true; case R.id.action_store: - storeToot(true); + storeToot(true, true); return true; case R.id.action_restore: try{ @@ -1061,7 +1061,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc Toast.makeText(getApplicationContext(), R.string.toot_scheduled_date, Toast.LENGTH_LONG).show(); }else { //Store the toot as draft first - storeToot(false); + storeToot(false, false); //Schedules the toot ScheduledTootsSyncJob.schedule(getApplicationContext(), currentToId, time); //Clear content @@ -1408,7 +1408,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE); boolean storeToot = sharedpreferences.getBoolean(Helper.SET_AUTO_STORE, true); if( storeToot && accountReply == null) - storeToot(true); + storeToot(true, false); } @@ -1817,12 +1817,14 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc - private void storeToot(boolean message){ + private void storeToot(boolean message, boolean forced){ //Nothing to store here.... - if(toot_content.getText().toString().trim().length() == 0 && (attachments == null || attachments.size() <1) && toot_cw_content.getText().toString().trim().length() == 0) - return; - if( initialContent.trim().equals(toot_content.getText().toString().trim())) - return; + if( !forced) { + if (toot_content.getText().toString().trim().length() == 0 && (attachments == null || attachments.size() < 1) && toot_cw_content.getText().toString().trim().length() == 0) + return; + if (initialContent.trim().equals(toot_content.getText().toString().trim())) + return; + } Status toot = new Status(); toot.setSensitive(isSensitive); toot.setMedia_attachments(attachments);