From 6768f382a8950f00720706a7592578d5c6e5cc84 Mon Sep 17 00:00:00 2001 From: tom79 Date: Wed, 4 Oct 2017 17:05:47 +0200 Subject: [PATCH] Avoids to store toots when using cross actions with replies --- .../etalab/mastodon/activities/TootActivity.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 3395b6e29..3edc8ee54 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 @@ -941,6 +941,17 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc if( itemViewReply != null) itemViewReply.setVisible(false); } + if( accountReply != null){ + MenuItem itemRestore = menu.findItem(R.id.action_restore); + if( itemRestore != null) + itemRestore.setVisible(false); + MenuItem itemSchedule = menu.findItem(R.id.action_schedule); + if( itemSchedule != null) + itemSchedule.setVisible(false); + MenuItem itemStore= menu.findItem(R.id.action_store); + if( itemStore != null) + itemStore.setVisible(false); + } return true; } @@ -1095,7 +1106,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc super.onPause(); final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE); boolean storeToot = sharedpreferences.getBoolean(Helper.SET_AUTO_STORE, true); - if( storeToot) + if( storeToot && accountReply == null) storeToot(true); }