mosaicnetworks / babble-android

Babble android library
MIT License
8 stars 1 forks source link

Fix configure BaseConfigActivity bug #34

Closed joneskm closed 4 years ago

joneskm commented 4 years ago

The BaseConfigActivity was setting a static flag to prevent methods which controllled which tabs to display and whether to show archive backups being called after the class's onCrate method had been called. Given that the parameter was static it lasted the lifetime of the process, including configuration changes. This meant that the BaseConfigClass could no be reinitialised e.g. when there was a configuration change.

This fixes the bug by changing the flags and the methods that set them to non-statics. Additionally these methods are now called from the onCreate method of classes which inherit from the BaseConfigActivity.