mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 11:12:15 -05:00
correctly preserve state in EncryptTextFragment
This commit is contained in:
parent
56a75774d0
commit
426d17bd0a
@ -56,9 +56,10 @@ import java.util.Set;
|
||||
public class EncryptTextFragment extends CryptoOperationFragment {
|
||||
|
||||
public static final String ARG_TEXT = "text";
|
||||
public static final String ARG_USE_COMPRESSION = "use_compression";
|
||||
|
||||
private boolean mShareAfterEncrypt = false;
|
||||
private boolean mUseCompression = true;
|
||||
private boolean mShareAfterEncrypt;
|
||||
private boolean mUseCompression;
|
||||
private boolean mHiddenRecipients = false;
|
||||
|
||||
private String mMessage = "";
|
||||
@ -117,10 +118,21 @@ public class EncryptTextFragment extends CryptoOperationFragment {
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
outState.putBoolean(ARG_USE_COMPRESSION, mUseCompression);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
mMessage = getArguments().getString(ARG_TEXT);
|
||||
if (savedInstanceState == null) {
|
||||
mMessage = getArguments().getString(ARG_TEXT);
|
||||
}
|
||||
|
||||
Bundle args = savedInstanceState == null ? getArguments() : savedInstanceState;
|
||||
mUseCompression = args.getBoolean(ARG_USE_COMPRESSION, true);
|
||||
|
||||
setHasOptionsMenu(true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user