if you already received Unemployment benefits ("dagpenge") on Januay 1, 2019 then you can continue to receive benefits until the 2-year period expires.
Only people who apply for dagpenge after January 1, 2019 need to meet the new residence requirement.
And your second question:
Yes I think I understand. But now you ask for another situation than in your initial question. In your question you would go on barsel during unemployment period.
Now you ask if you go on barsel as unemployed.
If you go on "barsel" while you are unemployed, then you can get barselsdagpenge if you are entitled to normal dagpenge on the day you apply for baselsdagpenge.
In this case it is my assumption that your A-kasse/Udbetaling Danmark will not make a new assessment..meaning that if you are within a unemployment benefit period, then you also will be able to get barselsdagpenge...also if you apply for barselsdagpenge after January 1, 2019.
However I will recommend you to get this confirmed by your A-kasse.