The next paragraph begins with a "but" which is a contrasting or comparative word and it is followed by the word "if." While our salvation is not conditional (it doesn't depend on us) our fellowship is. Ever heard the expression: "Feel far from God? Guess who moved!" Our fellowship is dependent upon how we respond to God. While our sin is covered by the blood of Christ and doesn't affect our position with Christ, it can still affect our fellowship.
If we say we have no sin we are only fooling ourselves and the truth is not in us. Sin needs to be treated daily like weeds growing in a garden. Repentance and confession should be a daily part of our Christian walk. If we acknowledge our sin, He is faithful and just to forgive us our sins and to cleanse us from all unrighteousness.
The next "If we say" is coming from someone who says "I have not sinned." We need to be honest with God. By saying we have not sinned we are calling God a liar and that his Word is not true and can't be trusted. But His word tells us that "All have sinned and come short of the glory of God." The best way is to own up to our sin and confess it and ask for His loving forgiveness and then forsake it. Only then c