There's nothing wrong with wanting to combine a charging circuit in your power supply. However consider that it may be simpler to have the battery provide power continually, and let the charger send whatever amount of juice replenishes the battery. Regulate the supply voltage so it never goes above a level which is safe for the battery.
Notice that most of the time the supply is the primary source of electrons, and those electrons pass right by the battery. The battery sits idle most of the time accepting a few mA of trickle current.
Steering diodes may be added, for a measure of protection.
The above setup requires care in design and adjustment. However it takes more effort to create a combination power supply and charging module, which must decide what to do: whether to power a circuit, or charge a battery, or stop charging, or whatever.