ncapdevi / FragNav

An Android library for managing multiple stacks of fragments
1.5k stars 220 forks source link

commitTransaction does not use mDefaultTransactionOptions allowlossless #124

Closed stscdev closed 6 years ago

stscdev commented 6 years ago

When provding default transaction options with the builder, the allowlossles does not get evaluated.

Example: _builder.defaultTransactionOptions(FragNavTransactionOptions.newBuilder().allowStateLoss(true).build());

Now call pushFragment(fragment); with not transactionOptions. So the default transaction options should be used.

In private void commitTransaction(FragmentTransaction fragmentTransaction, @Nullable FragNavTransactionOptions transactionOptions) only the transactionOptions parameter is used, but not the default transaction options when the parameter is null

mateherber commented 6 years ago

Hi @stsccl, Thanks for reporting this! I've just realized myself last week. This has been issued in https://github.com/ncapdevi/FragNav/pull/134