Ensure that I2P system vars are set in any Activity that uses I2PBote
Sometimes the Android runtime kills off the Bote process to save memory, and recreates it when the user next opens it. If the user was on an Activity that was not EmailListActivity, then when recreated the I2P system vars would not be set, and the first call to I2PBote.getInstance() would create an instance with invalid paths. This was non-fatal - killing Bote and restarting it would fix the problem - but was bad UX, because from the user's PoV all their emails and data had disappeared.
This commit is contained in:
@@ -39,6 +39,10 @@ public class ViewEmailActivity extends ActionBarActivity implements
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_view_email);
|
||||
|
||||
// Initialize I2P settings
|
||||
InitActivities init = new InitActivities(this);
|
||||
init.initialize();
|
||||
|
||||
// Enable ActionBar app icon to behave as action to go back
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user